diff --git a/buildSrc/src/main/java/fr/altarik/ReportDiscord.java b/buildSrc/src/main/java/fr/altarik/ReportDiscord.java index 122217f..15ad0c1 100644 --- a/buildSrc/src/main/java/fr/altarik/ReportDiscord.java +++ b/buildSrc/src/main/java/fr/altarik/ReportDiscord.java @@ -42,7 +42,7 @@ public abstract class ReportDiscord extends DefaultTask { .build(); try(Response response = client.newCall(request).execute()) { getLogger().info("report sent"); - if(!(response.code() == 200)) { + if(!response.isSuccessful()) { throw new GradleException("Discord returned a " + response.code() + " code: " + response.message()); } }