Which HTTP status must be returned for api/object?filter=param if record not found? I see following variants:
- return 404
- return 200 and blank response, for example {}
I don not find conventions for ruby community. What is best practice?
Which HTTP status must be returned for api/object?filter=param if record not found? I see following variants:
I don not find conventions for ruby community. What is best practice?
Copyright © 2021 Jogjafile Inc.
You can go in the deep here: Proper REST response for empty table?
I think is correct to replay 200 with an empty object if you are calling an 'index' endpoint with search params
users?age=18But if you are calling a 'show' endpoint you should return 404
users/1