[MM-57826] Make sure the original errors are wrapped when AppErrors are returned (#26771)

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
Ben Schumacher
2024-04-22 12:03:28 +02:00
коммит произвёл GitHub
родитель 423809e0d0
Коммит 8348acac49
33 изменённых файлов: 132 добавлений и 132 удалений

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

@@ -244,7 +244,7 @@ func remoteSetProfileImage(c *Context, w http.ResponseWriter, r *http.Request) {
}
if err := r.ParseMultipartForm(*c.App.Config().FileSettings.MaxFileSize); err != nil {
c.Err = model.NewAppError("remoteUploadProfileImage", "api.user.upload_profile_user.parse.app_error", nil, err.Error(), http.StatusInternalServerError)
c.Err = model.NewAppError("remoteUploadProfileImage", "api.user.upload_profile_user.parse.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
return
}