mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-26 08:58:24 +00:00 
			
		
		
		
	Improve package API log handling (#35100)
Simplify code and fix log processing logic
This commit is contained in:
		| @@ -30,10 +30,9 @@ func apiError(ctx *context.Context, status int, obj any) { | ||||
| 		ErrorMessages []string `json:"error_messages"` | ||||
| 	} | ||||
|  | ||||
| 	helper.LogAndProcessError(ctx, status, obj, func(message string) { | ||||
| 		ctx.JSON(status, Error{ | ||||
| 			ErrorMessages: []string{message}, | ||||
| 		}) | ||||
| 	message := helper.ProcessErrorForUser(ctx, status, obj) | ||||
| 	ctx.JSON(status, Error{ | ||||
| 		ErrorMessages: []string{message}, | ||||
| 	}) | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user