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

Replace all REST query empty result HTTP Status codes to 200 #2007

Closed
4 tasks
fedekunze opened this issue Aug 13, 2018 · 1 comment
Closed
4 tasks

Replace all REST query empty result HTTP Status codes to 200 #2007

fedekunze opened this issue Aug 13, 2018 · 1 comment

Comments

@fedekunze
Copy link
Collaborator

Summary

Replace all query empty results HTTP Status codes to 200 (OK)

Problem Definition

I've seen in several places in the gov module and in other files that the returned status code we are using for an empty search (i.e. query) result are 500 (Internal Server Error), 204 (No Content) or 404 (Not Found).

Proposal

Replace all for status 200 (OK), since it's the standard to handle that situation.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@jackzampolin
Copy link
Member

I like this idea quite a bit!

@fedekunze fedekunze added the lite label Aug 31, 2018
@fedekunze fedekunze removed their assignment Jan 23, 2019
alessio pushed a commit that referenced this issue Apr 10, 2019
All query params that are empty now returns success
(http.StatusOK) instead of mixed http status codes
(http.StatusNoContent/http.StatusBadRequest/
http.StatusInternalServerError)

Closes: #2007
alexanderbez pushed a commit that referenced this issue May 3, 2019
All query params that are empty now returns success
(http.StatusOK) instead of mixed http status codes
(http.StatusNoContent/http.StatusBadRequest/
http.StatusInternalServerError)

Closes: #2007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants