Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Detect if document update fails

This update-statement:

curl -v -X PUT 
  -d '{"fields":{"postings":{"assign":42}}}' 
  http://localhost:8080/document/v1/post/post/docid/ABCDEFG

Question:
The post "ABCDEFG" does not exist – but the server answers "200 OK".
Is there way to detect, that the update statement fails (e.g. getting a "404 NOT FOUND")?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

https://docs.vespa.ai/en/reference/document-v1-api-reference.html

Going by the documentation that is expected behavior. Utilize the condition parameter to determine if the document exists first in order to get a 412 status code instead.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading