aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-06-18 17:04:02 -0500
committerAnthony Wang2022-06-18 17:04:02 -0500
commitf602958f3c170c6b84b4ba0ece53568fddb56010 (patch)
tree45e9d3d72c0f84d7210ec7cc3b88c900c28a1ef1
parent28fd3e796e6fdd22d63fdd649cd3f053f3522ff3 (diff)
Use ctx.ServerError in reqsignature.go
-rw-r--r--routers/api/v1/activitypub/reqsignature.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/activitypub/reqsignature.go b/routers/api/v1/activitypub/reqsignature.go
index 460368552..b870d1c0f 100644
--- a/routers/api/v1/activitypub/reqsignature.go
+++ b/routers/api/v1/activitypub/reqsignature.go
@@ -94,7 +94,7 @@ func verifyHTTPSignatures(ctx *gitea_context.APIContext) (authenticated bool, er
func ReqHTTPSignature() func(ctx *gitea_context.APIContext) {
return func(ctx *gitea_context.APIContext) {
if authenticated, err := verifyHTTPSignatures(ctx); err != nil {
- ctx.Error(http.StatusInternalServerError, "verifyHttpSignatures", err)
+ ctx.ServerError("verifyHttpSignatures", err)
} else if !authenticated {
ctx.Error(http.StatusForbidden, "reqSignature", "request signature verification failed")
}