Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
send all gin errors to rollbar except "invalid url escape"
Browse files Browse the repository at this point in the history
  • Loading branch information
akaspin committed Sep 11, 2018
1 parent ce7627e commit 22b2bb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rollbar/gin.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func GinRecovery() gin.HandlerFunc {
"m+partner="+c.Request.Form.Get("partner"),
"url="+c.Request.URL.String(),
"remote_addr="+c.Request.RemoteAddr)
if !strings.HasPrefix(err.Error(), "gin.Error: invalid URL escape") {
RequestErrorWithStackSkip(ERR, c.Request, err, 3)
}
}

c.JSON(500, gin.H{
Expand Down

0 comments on commit 22b2bb6

Please sign in to comment.