Design for Error Response in Web Services
The server side should send error code and error message. Is that all? Yes, basically it will work, but not perfect yet. What you need to do: 1. Differentiate known, user-readable errors from unknown, developer-readable errors. 2. Send an error ID to client side when there is an unknown error, with which the client …