summaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
Diffstat (limited to 'vespa-http-client')
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
index 6fae0765e14..c469b902ed2 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
@@ -268,9 +268,13 @@ class ApacheGatewayConnection implements GatewayConnection {
private void verifyServerResponseCode(StatusLine statusLine) throws ServerResponseException {
// We use code 261-299 to report errors related to internal transitive errors that the tenants should not care
// about to avoid masking more serious errors.
- if (statusLine.getStatusCode() > 199 && statusLine.getStatusCode() < 260) {
+ int statusCode = statusLine.getStatusCode();
+ if (statusCode > 199 && statusCode < 260) {
return;
}
+ if (statusCode == 299) {
+ throw new ServerResponseException(429, "Too many requests.");
+ }
throw new ServerResponseException(statusLine.getStatusCode(), statusLine.getReasonPhrase());
}