Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
An example of a good error message coming from an HTTP API (illustrative for http://milancermak.posterous.com/http-apis-and-errors-doing-it-the-right-way)
HTTP/1.1 402 Payment Required
Content-Type: application/json
{
"title": "End of trial",
"description": "Unfortunately, your trial period has ended. To continue using the application, you need to purchase a subscription.",
"explanation_url": "https://example.com/troubleshooting/payment-required",
"trace_url": "https://apilog.example.com/f26a3e1dc"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment