Doesn't return an exception if 20X
This commit is contained in:
parent
18964aa779
commit
bb9ae4d59b
@ -42,7 +42,7 @@ public abstract class ReportDiscord extends DefaultTask {
|
|||||||
.build();
|
.build();
|
||||||
try(Response response = client.newCall(request).execute()) {
|
try(Response response = client.newCall(request).execute()) {
|
||||||
getLogger().info("report sent");
|
getLogger().info("report sent");
|
||||||
if(!(response.code() == 200)) {
|
if(!response.isSuccessful()) {
|
||||||
throw new GradleException("Discord returned a " + response.code() + " code: " + response.message());
|
throw new GradleException("Discord returned a " + response.code() + " code: " + response.message());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user