aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-06-10 11:41:29 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-06-10 11:41:29 +0200
commitbecde905f311604fb3cefa53011618cd89fbad7e (patch)
tree13d4d43d2d4e31799f7869a7839936fb98bc3cd1
parentfc86176192b782ab139b420e63764b189d9a3b3a (diff)
Print response, not request
-rw-r--r--vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java4
-rw-r--r--vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpRequest.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java
index 92e598e7307..82f74170230 100644
--- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java
+++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java
@@ -9,9 +9,7 @@ import org.apache.hc.client5.http.async.methods.SimpleHttpResponse;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.net.URIBuilder;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.PrintStream;
import java.io.UncheckedIOException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -134,7 +132,7 @@ class HttpFeedClient implements FeedClient {
if (type == null) // Not a Vespa response, but a failure in the HTTP layer.
throw new FeedException("Status " + response.getCode() + " executing '" + request +
- "': " + (message == null ? request.getBodyText() : message));
+ "': " + (message == null ? response.getBodyText() : message));
return new Result(type, documentId, message, trace);
}
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpRequest.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpRequest.java
new file mode 100644
index 00000000000..c3fb37fe4df
--- /dev/null
+++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpRequest.java
@@ -0,0 +1,3 @@
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package ai.vespa.feed.client;public class HttpRequest {
+}