From ef9c0c6c6afa1ac20fe740955f4269f891391804 Mon Sep 17 00:00:00 2001 From: Howl Date: Thu, 16 Jun 2016 13:59:18 +0200 Subject: [PATCH] When erroring from c.Error(), give actual error, not a *gin.Error --- app/recovery.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/recovery.go b/app/recovery.go index e55ad60..1f44422 100644 --- a/app/recovery.go +++ b/app/recovery.go @@ -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,