We are in the middle of a ongoing discussion about how to handle REST exceptions.
Response Content type : JSON
Two solutions we have:
- Throw all the unchecked exceptions as a JSON response.
- Send Request Invalid Response code.
Arguments:
- When its a error, why return JSON? Just send a invalid response code.
Counter Argument:
- Response code are too technical to handle for normal developers.
Whats your say??
See Question&Answers more detail:os