Add loging ShouldBindJSON error to console
This commit is contained in:
parent
137d343773
commit
e26808e2f3
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user