diff options
author | Bjørn Christian Seime <bjorncs@vespa.ai> | 2023-11-17 11:16:25 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@vespa.ai> | 2023-11-17 11:16:25 +0100 |
commit | bfff665b4551e299bb890fcae3b707aff4132527 (patch) | |
tree | 3dc33b2347e183a88bcb1162a7f4683e8f889b37 /container-core/src/main | |
parent | cb8a697b6422a8e7b87a9ec9cfce792e002bb207 (diff) |
Return 404 on missing path parameter
Diffstat (limited to 'container-core/src/main')
-rw-r--r-- | container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java b/container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java index c7055c53a64..196a57d23bf 100644 --- a/container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java +++ b/container-core/src/main/java/com/yahoo/restapi/RestApiImpl.java @@ -500,7 +500,7 @@ class RestApiImpl implements RestApi { } @Override public String getStringOrThrow(String name) { return getString(name) - .orElseThrow(() -> new RestApiException.BadRequest("Path parameter '" + name + "' is missing")); + .orElseThrow(() -> new RestApiException.NotFound("Path parameter '" + name + "' is missing")); } @Override public HttpURL.Path getFullPath() { return pathMatcher.getPath(); |