-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use problem json (RFC 7807) for error reporting
- Loading branch information
Showing
5 changed files
with
96 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"description": "Default error response. TODO: replace with https://datatracker.ietf.org/doc/html/rfc9457", | ||
"description": "Error response that follows https://datatracker.ietf.org/doc/html/rfc7807#section-3.1", | ||
"title": "Error", | ||
"type": "object", | ||
"required": ["message"], | ||
"required": ["type", "title", "status", "detail"], | ||
"properties": { | ||
"message": { "type": "string" }, | ||
"data": { "type": "object" } | ||
"type": { | ||
"type": "string", | ||
"format": "uri", | ||
"description": "A URI reference [RFC3986] that identifies the problem type." | ||
}, | ||
"title": { "type": "string", "description": "A short, human-readable summary of the problem type." }, | ||
"status": { "type": "integer", "description": "The HTTP status code ([RFC7231], Section 6)" }, | ||
"detail": { | ||
"type": "string", | ||
"description": "A human-readable explanation specific to this occurrence of the problem." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters