When erroring from c.Error(), give actual error, not a *gin.Error
This commit is contained in:
parent
9658957067
commit
ef9c0c6c6a
|
@ -62,8 +62,12 @@ func Recovery(client *raven.Client, onlyCrashes bool) gin.HandlerFunc {
|
|||
}
|
||||
if !onlyCrashes {
|
||||
for _, item := range c.Errors {
|
||||
var err = error(item)
|
||||
if item.Type == gin.ErrorTypePrivate {
|
||||
err = item.Err
|
||||
}
|
||||
client.CaptureError(
|
||||
item,
|
||||
err,
|
||||
flags,
|
||||
stackTrace,
|
||||
ravenHTTP,
|
||||
|
|
Loading…
Reference in New Issue
Block a user