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

404 response to /regulator/{id}/ when not all ids could be mapped. #9

Closed
alecKent opened this issue May 3, 2022 · 4 comments
Closed

Comments

@alecKent
Copy link

alecKent commented May 3, 2022

I am curious about the logic for using 404 as the response if not all ids were able to be attached.

404 is defined as "The server has not found anything matching the Request-URI".

If I am reading the docs correctly in the case that not all ids could be mapped the request URI /regulator/{id}/ is valid and a matching resource was found, the issue exists within the array of ids to map.

Since the /regulator/{id}/ transaction doesn't seem to follow ACID I think the request should return a 200 response code since it is possible that some ids were mapped successfully.
Then it is on the caller to check if the failures array has data / exists at all.

Thoughts on this?

@elibosley
Copy link
Member

This is a really great point. I am happy to change to a 200 with a failure array.

@alecKent
Copy link
Author

alecKent commented May 5, 2022

Nice. I think a 200 would result in the least amount of confusion.
That way 404 can be reserved for when the requested resource is not found.

@danaspiegel
Copy link
Member

#13

@danaspiegel
Copy link
Member

Closing issue as this will be handled with issue #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants