"In the latter case, the exception contains details such as the error message returned by the server." . . . .