resourcejs icon indicating copy to clipboard operation
resourcejs copied to clipboard

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

Open alphara opened this issue 7 years ago • 1 comments

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 avatar Mar 29 '17 03:03 alphara

@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

zackurben avatar Mar 29 '17 14:03 zackurben