[ADP-402] Empty Problem Type
According to https://www.rfc-editor.org/rfc/rfc7807#section-4.2, if you don’t need extra information to expand the original HTTP status code, you could use about:blank
.
Guidance
- MAY use
about:blank
if you don’t need extra information to expand the original HTTP status code. - You MAY specify the type as status code reflected text even you don't have the plan to publish the problem type to the public network.
Example
Both of the following work:
http
HTTP/1.1 404 Not Found
Content-Type: application/problem+json
Content-Language: en
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "The requested resource could not be found on this server."
}
http
HTTP/1.1 404 Not Found
Content-Type: application/problem+json
Content-Language: en
{
"type": "/problems/not-found",
"title": "Not Found",
"status": 404,
"detail": "The requested resource could not be found on this server."
}