Skip to content

Instantly share code, notes, and snippets.

@simonplend
Last active November 19, 2020 08:24
Show Gist options
  • Save simonplend/23a173b4cbfaac0da282c55f3ff195b4 to your computer and use it in GitHub Desktop.
Save simonplend/23a173b4cbfaac0da282c55f3ff195b4 to your computer and use it in GitHub Desktop.
Example from RFC 7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807)
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
Content-Language: en
{
"type": "https://example.net/validation-error",
"title": "Your request parameters didn't validate.",
"invalid-params": [
{
"name": "age",
"reason": "must be a positive integer"
},
{
"name": "color",
"reason": "must be 'green', 'red' or 'blue'"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment