mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 02:08:36 +00:00
Refactor error system (#33626)
This commit is contained in:
@@ -170,7 +170,7 @@ func AcceptTransfer(ctx *context.APIContext) {
|
||||
case errors.Is(err, util.ErrPermissionDenied):
|
||||
ctx.APIError(http.StatusForbidden, err)
|
||||
default:
|
||||
ctx.APIError(http.StatusInternalServerError, err)
|
||||
ctx.APIErrorInternal(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -212,7 +212,7 @@ func RejectTransfer(ctx *context.APIContext) {
|
||||
case errors.Is(err, util.ErrPermissionDenied):
|
||||
ctx.APIError(http.StatusForbidden, err)
|
||||
default:
|
||||
ctx.APIError(http.StatusInternalServerError, err)
|
||||
ctx.APIErrorInternal(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user