This topic refers to (presumably) the following endpoints:
POST /notification
PUT /document/identity
DELETE /document/identity
DELETE /document
POST /document/collect_id
POST /identity/mapping
POST /document
POST /consent/get
POST /document/revoke
Some of these methods return HTTP 400 with some error message from MongoDB in case that no results were found.
Returning Code 404 instead would be helpful to differentiate this kind of condition from other kind of errors.
Maybe this Code could also be returned in endpoints like PUT /document/identity in case that no document exists for the given parameters (i guess it should not be possible to upload an identity for a non existing document?).
This is just a proposal that needs to be discussed.
This topic refers to (presumably) the following endpoints: POST /notification PUT /document/identity DELETE /document/identity DELETE /document POST /document/collect_id POST /identity/mapping POST /document POST /consent/get POST /document/revoke
Some of these methods return HTTP 400 with some error message from MongoDB in case that no results were found. Returning Code 404 instead would be helpful to differentiate this kind of condition from other kind of errors.
Maybe this Code could also be returned in endpoints like PUT /document/identity in case that no document exists for the given parameters (i guess it should not be possible to upload an identity for a non existing document?).
This is just a proposal that needs to be discussed.