aboutsummaryrefslogtreecommitdiffstats
path: root/hosted-api
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-11-20 12:01:10 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-11-20 12:01:10 +0100
commit80b29f6cf9c1885a2d3864f27d319054d683e00f (patch)
tree9c452a25dfea449e2026e2e8764c0692ac63f425 /hosted-api
parent1f65e089ab875952bea5914b9630360145d92b9f (diff)
Add URL and more logging when controller http client fails
Diffstat (limited to 'hosted-api')
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java b/hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java
index d074915a023..3a848b33c76 100644
--- a/hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java
@@ -281,12 +281,12 @@ public abstract class ControllerHttpClient {
if (response.statusCode() / 100 == 4)
throw new IllegalArgumentException("Bad request for " + request + ": " + message);
- throw new IOException("Failed " + request + ": " + message);
+ throw new IOException(message);
}
catch (IOException e) { // Catches the above, and timeout exceptions from the client.
if (thrown == null)
- thrown = new UncheckedIOException(e);
+ thrown = new UncheckedIOException("Failed " + request + ": " + e, e);
else
thrown.addSuppressed(e);