From 75dffc0a110405807d5e6a6dd9e0815299d894ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 26 Aug 2015 12:15:03 +0200 Subject: [PATCH] Mention status code in failed state --- src/main/java/net/pterodactylus/rhynodge/queries/HttpQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.7.4