v0.0.483
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m37s

This commit is contained in:
2024-07-16 15:08:37 +02:00
parent 6ded615723
commit bc5c61e43d
4 changed files with 43 additions and 22 deletions

View File

@@ -13,6 +13,10 @@ type jsonAPIErrResponse struct {
cookies []cookieval
}
func (j jsonAPIErrResponse) Error() error {
return j.err
}
func (j jsonAPIErrResponse) Write(g *gin.Context) {
for _, v := range j.headers {
g.Header(v.Key, v.Val)
@@ -64,7 +68,7 @@ func (j jsonAPIErrResponse) Unwrap() error {
return j.err
}
func Error(e error) HTTPResponse {
func Error(e error) InspectableHTTPErrorResponse {
return &jsonAPIErrResponse{
err: exerr.FromError(e),
}