aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
authorHaakon Dybdahl <dybdahl@yahoo-inc.com>2017-01-26 08:57:28 +0100
committerHaakon Dybdahl <dybdahl@yahoo-inc.com>2017-01-26 09:00:07 +0100
commit942c92856bc211250535170dc03d3a9a25cdade7 (patch)
tree063f5d1f59ac9946390f3d1516f9d0e38cd18ede /vespaclient-container-plugin
parent5014f2a78843fe25490df4b5bbaab8478275113e (diff)
Reduce number of error codes over http api, not yet live.
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java
index d27ebc551d9..2b33c23cf5f 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/ClientFeederV3.java
@@ -133,7 +133,13 @@ class ClientFeederV3 {
* We try 10 for now. This should only kick in with very massive feeding to few gateway nodes.
*/
if (feederSettings.denyIfBusy && threadsAvailableForFeeding.get() < -10) {
- return new ErrorHttpResponse(429, "Gateway overloaded");
+ final int returnCode;
+ if (request.getHeader(Headers.SILENTUPGRADE) != null ) {
+ returnCode = 299;
+ } else {
+ returnCode = 429;
+ }
+ return new ErrorHttpResponse(returnCode, "Gateway overloaded");
}
InputStream inputStream = StreamReaderV3.unzipStreamIfNeeded(request);