diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-02-03 09:54:05 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-02-03 09:54:15 +0100 |
commit | 05af890e5b161f17bdfad0a48f2da5daefb5857c (patch) | |
tree | fb681003d0f6ea444e510927bcab6a6c4a4ef34e | |
parent | 5bf4684db649458dc798ce8e9592ef1ae7a7ad3f (diff) |
Move request validation earlier for deletion visits
-rw-r--r-- | vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java index a10d9802e14..4b49c5cdafb 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java @@ -390,10 +390,10 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler { } private ContentChannel deleteDocuments(HttpRequest request, DocumentPath path, ResponseHandler handler) { - enqueueAndDispatch(request, handler, () -> { - if (getProperty(request, SELECTION).isEmpty()) - throw new IllegalArgumentException("Missing required property '" + SELECTION + "'"); + if (getProperty(request, SELECTION).isEmpty()) + throw new IllegalArgumentException("Missing required property '" + SELECTION + "'"); + enqueueAndDispatch(request, handler, () -> { VisitorParameters parameters = parseParameters(request, path); parameters.setFieldSet(DocIdOnly.NAME); TestAndSetCondition condition = new TestAndSetCondition(parameters.getDocumentSelection()); |