mirror of
https://github.com/go-gitea/gitea
synced 2025-07-14 22:47:21 +00:00
Refactor error system (#33610)
This commit is contained in:
@ -78,7 +78,7 @@ func GetHook(ctx *context.APIContext) {
|
||||
|
||||
apiHook, err := webhook_service.ToHook(ctx.ContextUser.HomeLink(), hook)
|
||||
if err != nil {
|
||||
ctx.InternalServerError(err)
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, apiHook)
|
||||
|
Reference in New Issue
Block a user