mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-02 04:09:01 +00:00
Improve package API log handling (#35100)
Simplify code and fix log processing logic
This commit is contained in:
@@ -26,9 +26,8 @@ import (
|
||||
)
|
||||
|
||||
func apiError(ctx *context.Context, status int, obj any) {
|
||||
helper.LogAndProcessError(ctx, status, obj, func(message string) {
|
||||
ctx.PlainText(status, message)
|
||||
})
|
||||
message := helper.ProcessErrorForUser(ctx, status, obj)
|
||||
ctx.PlainText(status, message)
|
||||
}
|
||||
|
||||
// https://dnf.readthedocs.io/en/latest/conf_ref.html
|
||||
|
Reference in New Issue
Block a user