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

Return code 200 and empty array instead of error 500 on GET request for empty collection #71

Open
alphara opened this issue Mar 29, 2017 · 1 comment

Comments

@alphara
Copy link

alphara commented Mar 29, 2017

I'm getting error 500 on GET /resource requests, when resources is empty collection in MongoDB.

Can you return code 200 and empty array instead?

@alphara alphara changed the title Error 500 on GET request for empty collection Return code 200 and empty array instead error 500 on GET request for empty collection Mar 29, 2017
@alphara alphara changed the title Return code 200 and empty array instead error 500 on GET request for empty collection Return code 200 and empty array instead of error 500 on GET request for empty collection Mar 29, 2017
@zackurben
Copy link
Contributor

@alphara this sounds like an actual error, if you have a collection with no entities, you will get a 200 w/ an empty array.

This will take some more investigation

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

No branches or pull requests

2 participants