Has there been any discussion about extending the standard to support additional properties under the source
property of an error object? In particular:
- In some cases an error is associated with a particular header (Accept, Content-Type, or Authorization for example). I could see the usefulness of an error like:
{
"id": "…",
"status": "406",
"code": "Not Acceptable",
"title": "The request expects a media type that is not available",
"detail": "You requested image/jpeg but we only support application/vnd.api+json"
"source": {
"header": "Accept"
}
}
- Maybe (not sure) there’s value in pinpointing the error in the path, eg:
{
"id": "…",
"status": "404",
"code": "Not Found",
"title": "The requested resource does not exist",
"detail": "There is no resource of type 'foo' with id '1234'"
"source": {
"path": "/v1/foo/1234"
}
}