Problem Details: A standard way of specifying errors in HTTP API responses | Luru

PHOTO EMBED

Fri Apr 22 2022 19:06:37 GMT+0000 (Coordinated Universal Time)

Saved by @iamsingularity #json

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"],
    "status": 403
}
content_copyCOPY

https://lurumad.github.io/problem-details-an-standard-way-for-specifying-errors-in-http-api-responses-asp.net-core