[MM-45990] log JSON parsing errors in API4 (#20724)

Этот коммит содержится в:
Tim Scheuermann
2022-07-28 18:05:03 +03:00
коммит произвёл GitHub
родитель 04cd6d35e9
Коммит 832736da37
51 изменённых файлов: 316 добавлений и 228 удалений

Просмотреть файл

@@ -84,7 +84,7 @@ func testDoUploadFileRequest(t testing.TB, c *model.Client4, url string, blob []
var res model.FileUploadResponse
if jsonErr := json.NewDecoder(resp.Body).Decode(&res); jsonErr != nil {
return nil, nil, model.NewAppError("doUploadFile", "api.unmarshal_error", nil, jsonErr.Error(), http.StatusInternalServerError)
return nil, nil, model.NewAppError("doUploadFile", "api.unmarshal_error", nil, "", http.StatusInternalServerError).Wrap(jsonErr)
}
return &res, model.BuildResponse(resp), nil
}