Showing posts with label REST. Show all posts
Showing posts with label REST. Show all posts

Tuesday, March 25, 2014

JSON REST Webservice Error Responses

Over the years I've seen many formats for error responses from JSON formatted REST webservices.  Well, there's a draft standard.

The quick answer is:

Error Response

In the event of an error, a 4xx or 5xx HTTP status code SHOULD BE expressed in the response, with an entity body containing an error object adhering to the following structure: { "error": number, "reason": string, "detail": string }

Labels

Blog Archive

Contributors