diff options
author | Wim <wim@42.be> | 2020-01-09 21:02:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-09 21:02:56 +0100 |
commit | 0f708daf2d14dcca261ef98cc698a1b1f2a6aa74 (patch) | |
tree | 022eee21366d6a9a00feaeff918972d9e72632c2 /vendor/github.com/labstack/echo/v4/echo.go | |
parent | b9354de8fd5e424ac2f246fff1a03b27e8094fd8 (diff) | |
download | matterbridge-msglm-0f708daf2d14dcca261ef98cc698a1b1f2a6aa74.tar.gz matterbridge-msglm-0f708daf2d14dcca261ef98cc698a1b1f2a6aa74.tar.bz2 matterbridge-msglm-0f708daf2d14dcca261ef98cc698a1b1f2a6aa74.zip |
Update dependencies (#975)
Diffstat (limited to 'vendor/github.com/labstack/echo/v4/echo.go')
-rw-r--r-- | vendor/github.com/labstack/echo/v4/echo.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/vendor/github.com/labstack/echo/v4/echo.go b/vendor/github.com/labstack/echo/v4/echo.go index 552c7a78..a6ac0fa8 100644 --- a/vendor/github.com/labstack/echo/v4/echo.go +++ b/vendor/github.com/labstack/echo/v4/echo.go @@ -227,7 +227,7 @@ const ( const ( // Version of Echo - Version = "4.1.10" + Version = "4.1.13" website = "https://echo.labstack.com" // http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo banner = ` @@ -354,10 +354,14 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) { Message: http.StatusText(http.StatusInternalServerError), } } + + // Issue #1426 + code := he.Code + message := he.Message if e.Debug { - he.Message = err.Error() - } else if m, ok := he.Message.(string); ok { - he.Message = Map{"message": m} + message = err.Error() + } else if m, ok := message.(string); ok { + message = Map{"message": m} } // Send response @@ -365,7 +369,7 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) { if c.Request().Method == http.MethodHead { // Issue #608 err = c.NoContent(he.Code) } else { - err = c.JSON(he.Code, he.Message) + err = c.JSON(code, message) } if err != nil { e.Logger.Error(err) |