Replies: 1 comment 4 replies
|
well the default error handler could be changed to know RFC 9457 type ala type ProblemError struct {
Type string `json:"type"`
Title string `json:"title"`
Status int `json:"status"`
Detail string `json:"detail,omitempty"`
Instance string `json:"instance,omitempty"`
}also maybe additional interface with mehtod that can return RFC 9457 type so your own error types can be converted to it and write it as |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Echo should support RFC 9457 because it gives Go APIs a standard, machine-readable error format that clients can reliably parse, instead of every team inventing its own JSON error shape. RFC 9457 also keeps HTTP concerns out of business logic by cleanly mapping application errors to
application/problem+json, which should fit Echo’s role as a lean framework for building APIs.All reactions