Support JSON Problem responses to webservices automatically - Problem Details for HTTP APIs

Description

https://tools.ietf.org/html/rfc7807

using intererceptors, add OPTIONAL (configurable) feature to translate exceptions processing into JSON problem details

e.g.:
HTTP/1.1 403 Forbidden
Content-Type: application/problem+json
Content-Language: en

{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit.",
"detail": "Your current balance is 30, but that costs 50.",
"instance": "/account/12345/msgs/abc",
"balance": 30,
"accounts": ["/account/12345",
"/account/67890"]
}

Looks like potentially nice way to have API servers return automatic but computer readable/usable error messages (like SOAP-FAULT).

Status

Assignee

Lewis Pringle

Reporter

Lewis Pringle

Labels

None

Priority

Medium
Configure