Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API 2.9: Change Request to be discussed: HTTP 404 return in case no results were found instead of 400 #86

Open
JuAlMan opened this issue Aug 2, 2024 · 0 comments
Labels
api_v2.9 enhancement New feature or request

Comments

@JuAlMan
Copy link

JuAlMan commented Aug 2, 2024

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.

@JuAlMan JuAlMan changed the title To be discussed: HTTP 404 return in case no results were found instead of 400 Change Request to be discussed: HTTP 404 return in case no results were found instead of 400 Aug 2, 2024
@JuAlMan JuAlMan changed the title Change Request to be discussed: HTTP 404 return in case no results were found instead of 400 API 2.9: Change Request to be discussed: HTTP 404 return in case no results were found instead of 400 Aug 5, 2024
@masv3971 masv3971 added enhancement New feature or request api_v2.9 labels Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api_v2.9 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants