Skip to content

Commit

Permalink
add more debug information on failed requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlo Field committed Apr 10, 2021
1 parent 5586c64 commit 6007072
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/server/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ func updateProfile(c *gin.Context) {
}
err := c.BindJSON(&d)
if err != nil {
c.AbortWithStatus(500)
_ = c.AbortWithError(500, err)
return
}
backup(pwd, "profile")
f, err := os.Create(pwd + "/profile.sav")
if err != nil {
c.AbortWithStatus(500)
_ = c.AbortWithError(500, err)
return
}
defer f.Close()
Expand Down

0 comments on commit 6007072

Please sign in to comment.