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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…