API: Improve logging of bad request errors across all endpoints #271

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-07-10 09:38:36 +02:00
parent 6bfbad40af
commit 38da638f88
34 changed files with 64 additions and 79 deletions

View File

@@ -75,7 +75,7 @@ func OAuthRevoke(router *gin.RouterGroup) {
// Get the auth token to be revoked from the submitted form values or the request header.
if err = c.ShouldBind(&frm); err != nil && authToken == "" {
event.AuditWarn([]string{clientIp, "oauth2", actor, action, "%s"}, err)
AbortBadRequest(c)
AbortBadRequest(c, err)
return
} else if frm.Empty() {
frm.Token = authToken