Skip to content

Commit

Permalink
pangpanglabs#27 Fix missing error info in behaviorlog
Browse files Browse the repository at this point in the history
  • Loading branch information
elvinchan authored and Jaehue Jang committed Jan 13, 2020
1 parent bc85a29 commit 08fd5f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/go-xorm/xorm"
"github.com/labstack/echo"
"github.com/pangpanglabs/echosample/factory"
"github.com/pangpanglabs/goutils/behaviorlog"
)

const (
Expand Down Expand Up @@ -58,6 +59,7 @@ func ReturnApiFail(c echo.Context, status int, apiError ApiError, err error, v .
str := ""
if err != nil {
str = err.Error()
behaviorlog.FromCtx(c.Request().Context()).WithError(err)
}
return c.JSON(status, ApiResult{
Success: false,
Expand Down

0 comments on commit 08fd5f2

Please sign in to comment.