mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 17:20:53 +02:00
Improve package API log handling (#35100)
Simplify code and fix log processing logic
This commit is contained in:
1 parent
37958e486a
commit
f0da1de7e3
23 files changed
+101
-132
No files matched your search
@@ -93,10 +93,9 @@ func jsonResponse(ctx *context.Context, status int, obj any) {
|
||||
}
|
||||
|
||||
func apiError(ctx *context.Context, status int, err error) {
|
||||
helper.LogAndProcessError(ctx, status, err, func(message string) {
|
||||
setResponseHeaders(ctx.Resp, &containerHeaders{
|
||||
Status: status,
|
||||
})
|
||||
_ = helper.ProcessErrorForUser(ctx, status, err)
|
||||
setResponseHeaders(ctx.Resp, &containerHeaders{
|
||||
Status: status,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user