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 {
|
if !onlyCrashes {
|
||||||
for _, item := range c.Errors {
|
for _, item := range c.Errors {
|
||||||
|
var err = error(item)
|
||||||
|
if item.Type == gin.ErrorTypePrivate {
|
||||||
|
err = item.Err
|
||||||
|
}
|
||||||
client.CaptureError(
|
client.CaptureError(
|
||||||
item,
|
err,
|
||||||
flags,
|
flags,
|
||||||
stackTrace,
|
stackTrace,
|
||||||
ravenHTTP,
|
ravenHTTP,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user