mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-25 10:05:24 +09:00
Improve package API log handling (#35100)
Simplify code and fix log processing logic
This commit is contained in:
@ -40,9 +40,8 @@ var versionMatcher = regexp.MustCompile(`\Av?` +
|
||||
`\z`)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
// PackageMetadata returns the metadata for a single package
|
||||
|
Reference in New Issue
Block a user