Refactor error system (#33626)

This commit is contained in:
wxiaoguang
2025-02-18 04:41:03 +08:00
committed by GitHub
parent 7df09e31fa
commit 15e020eec8
75 changed files with 703 additions and 693 deletions

View File

@ -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
}