summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-02-03 10:47:53 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2018-02-03 10:47:53 +0100
commit039ae6fbba7556ba0e8128faa74260056c078869 (patch)
tree9656504e0172fc6786929bc1e9788160039f3231 /container-core
parentdb04b94cb72b730e437a6ed8968e09adfb0c68e1 (diff)
Try to differentiate between client and server errors.
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/VespaHeaders.java3
-rw-r--r--container-core/src/main/java/com/yahoo/container/protect/Error.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/VespaHeaders.java b/container-core/src/main/java/com/yahoo/container/jdisc/VespaHeaders.java
index ecb36ade5eb..b39fd7f5db7 100644
--- a/container-core/src/main/java/com/yahoo/container/jdisc/VespaHeaders.java
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/VespaHeaders.java
@@ -6,6 +6,7 @@ import static com.yahoo.container.protect.Error.BACKEND_COMMUNICATION_ERROR;
import static com.yahoo.container.protect.Error.BAD_REQUEST;
import static com.yahoo.container.protect.Error.FORBIDDEN;
import static com.yahoo.container.protect.Error.ILLEGAL_QUERY;
+import static com.yahoo.container.protect.Error.INSUFFICIENT_STORAGE;
import static com.yahoo.container.protect.Error.INTERNAL_SERVER_ERROR;
import static com.yahoo.container.protect.Error.INVALID_QUERY_PARAMETER;
import static com.yahoo.container.protect.Error.NOT_FOUND;
@@ -159,6 +160,8 @@ public final class VespaHeaders {
return new Tuple2<>(true, Response.Status.BAD_REQUEST);
if (error.getCode() == INTERNAL_SERVER_ERROR.code)
return new Tuple2<>(true, Response.Status.INTERNAL_SERVER_ERROR);
+ if (error.getCode() == INSUFFICIENT_STORAGE.code)
+ return new Tuple2<>(true, Response.Status.INSUFFICIENT_STORAGE);
return NO_MATCH;
}
diff --git a/container-core/src/main/java/com/yahoo/container/protect/Error.java b/container-core/src/main/java/com/yahoo/container/protect/Error.java
index 46b49b1623a..b39a33b1346 100644
--- a/container-core/src/main/java/com/yahoo/container/protect/Error.java
+++ b/container-core/src/main/java/com/yahoo/container/protect/Error.java
@@ -26,7 +26,8 @@ public enum Error {
FORBIDDEN(15),
NOT_FOUND(16),
BAD_REQUEST(17),
- INTERNAL_SERVER_ERROR(18);
+ INTERNAL_SERVER_ERROR(18),
+ INSUFFICIENT_STORAGE(19);
public final int code;