v0.0.483
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m37s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m37s
This commit is contained in:
@@ -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),
|
||||
}
|
||||
|
Reference in New Issue
Block a user