summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2024-01-05 12:00:16 +0100
committerjonmv <venstad@gmail.com>2024-01-05 12:00:16 +0100
commit4f0c334e6c8a27995996f56f2d01013843959cb7 (patch)
tree4ca05658bf91cc752bf9902715673b0e57837ab1 /vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java
parentad5add0e027cfbc384055c540e0b8f96c6f37543 (diff)
Use 500 for errors in document API, from /doc/v1
Diffstat (limited to 'vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java')
-rw-r--r--vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java
index 43b0db1464c..c8fcb4c4635 100644
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/resource/DocumentV1ApiTest.java
@@ -460,7 +460,7 @@ public class DocumentV1ApiTest {
assertEquals(400, response.getStatus());
// DELETE with namespace and document type is a restricted visit which deletes visited documents.
- // When visiting fails fatally, a 502 BAD GATEWAY is returned.
+ // When visiting fails fatally, a 500 INTERAL SERVER ERROR is returned.
access.expect(tokens.subList(0, 1));
access.expect(parameters -> {
assertEquals("(false) and (music) and (id.namespace=='space')", parameters.getDocumentSelection());
@@ -485,7 +485,7 @@ public class DocumentV1ApiTest {
"message": "boom"
}""",
response.readAll());
- assertEquals(502, response.getStatus());
+ assertEquals(500, response.getStatus());
// DELETE at the root is also a deletion visit. These also require a selection.
access.expect(parameters -> {
@@ -527,7 +527,7 @@ public class DocumentV1ApiTest {
"message": "error"
}""",
response.readAll());
- assertEquals(502, response.getStatus());
+ assertEquals(500, response.getStatus());
// GET with namespace, document type and number is a restricted visit.
access.expect(parameters -> {
@@ -931,12 +931,12 @@ public class DocumentV1ApiTest {
" \"pathId\": \"/document/v1/space/music/number/1/two\"," +
" \"message\": \"[FATAL_ERROR @ localhost]: FATAL_ERROR\"" +
"}", response1.readAll());
- assertEquals(502, response1.getStatus());
+ assertEquals(500, response1.getStatus());
assertSameJson("{" +
" \"pathId\": \"/document/v1/space/music/number/1/two\"," +
" \"message\": \"[FATAL_ERROR @ localhost]: FATAL_ERROR\"" +
"}", response2.readAll());
- assertEquals(502, response2.getStatus());
+ assertEquals(500, response2.getStatus());
// Request response does not arrive before timeout has passed.
AtomicReference<ResponseHandler> handler = new AtomicReference<>();