From 6305b79475ee23bcf8b32a6a14c22a80aa08ad31 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Fri, 19 Aug 2022 15:40:25 +0530 Subject: [PATCH] Print full error string instead of only detailed error (#20852) Due to the recent changes in error wrapping, the DetailedError field does not contain the full info of all the wrapped errors. Therefore, while printing the error, we display the stringified representation instead of only the DetailedError field. ```release-note NONE ``` --- web/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/context.go b/web/context.go index b46adb4a06..701f00dd97 100644 --- a/web/context.go +++ b/web/context.go @@ -105,7 +105,7 @@ func (c *Context) LogErrorByCode(err *model.AppError) { fields := []mlog.Field{ mlog.String("err_where", err.Where), mlog.Int("http_code", err.StatusCode), - mlog.String("err_details", err.DetailedError), + mlog.String("error", err.Error()), } switch { case (code >= http.StatusBadRequest && code < http.StatusInternalServerError) ||