When erroring from c.Error(), give actual error, not a *gin.Error

This commit is contained in:
Howl 2016-06-16 13:59:18 +02:00
parent 9658957067
commit ef9c0c6c6a
1 changed files with 5 additions and 1 deletions

View File

@ -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,