Reputation: 2823
I just want to clarify regarding the status code in case if there is invalid data in the database.
E.g. If something changed in the data base which cause error when call the GET end point. For instance lets assume in the database there is column to store json as a string. If the format has been changed.
Following link was there, but it specifically discussing about the incorrect input data
REST response code for invalid data
Upvotes: 0
Views: 477
Reputation: 718
Hmm... it's an error, so the options are 4XX
or 5XX
. 4XX
errors are client errors; it's not the client's job to enforce validity in the database, so those are out. That leaves 5XX
, and it's not clear that there's an obvious fit among those -- so, oddly enough, maybe 500
is the appropriate response?
Maybe we can propose a new one: 599 - My Bad
.
Upvotes: 0