From: David ‘Bombe’ Roden Date: Wed, 26 Aug 2015 10:15:03 +0000 (+0200) Subject: Mention status code in failed state X-Git-Tag: v2~167 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=75dffc0a110405807d5e6a6dd9e0815299d894ad;p=rhynodge.git Mention status code in failed state --- diff --git a/src/main/java/net/pterodactylus/rhynodge/queries/HttpQuery.java b/src/main/java/net/pterodactylus/rhynodge/queries/HttpQuery.java index 3d28590..8e2c242 100644 --- a/src/main/java/net/pterodactylus/rhynodge/queries/HttpQuery.java +++ b/src/main/java/net/pterodactylus/rhynodge/queries/HttpQuery.java @@ -81,7 +81,7 @@ public class HttpQuery implements Query { HttpConnectionParams.setSoTimeout(get.getParams(), (int) TimeUnit.SECONDS.toMillis(300)); HttpResponse response = httpClient.execute(get); if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { - return new FailedState(); + return new FailedState(new IllegalStateException(String.format("Invalid HTTP Status: %d", response.getStatusLine().getStatusCode()))); } HttpEntity entity = response.getEntity();