Add loging ShouldBindJSON error to console

This commit is contained in:
qowevisa 2024-11-16 11:42:59 +02:00
parent 137d343773
commit e26808e2f3

View File

@ -115,7 +115,8 @@ func UpdateHandler[T db.UserIdentifiable, R any](
var updates R var updates R
if err := c.ShouldBindJSON(&updates); err != nil { if err := c.ShouldBindJSON(&updates); err != nil {
c.JSON(400, types.ErrorResponse{Message: "Invalid request"}) log.Printf("c.ShouldBindJSON: error: %v\n", err)
c.JSON(400, types.ErrorResponse{Message: "Invalid request: 2"})
return return
} }