Consistent error wrapping (#30600)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
64ff2434ee
Коммит
354d7aeb72
@@ -876,7 +876,7 @@ func (a *App) SetProfileImage(c request.CTX, userID string, imageData *multipart
|
||||
|
||||
func (a *App) SetProfileImageFromMultiPartFile(c request.CTX, userID string, file multipart.File) *model.AppError {
|
||||
if limitErr := checkImageLimits(file, *a.Config().FileSettings.MaxImageResolution); limitErr != nil {
|
||||
return model.NewAppError("SetProfileImage", "api.user.upload_profile_user.check_image_limits.app_error", nil, "", http.StatusBadRequest)
|
||||
return model.NewAppError("SetProfileImage", "api.user.upload_profile_user.check_image_limits.app_error", nil, "", http.StatusBadRequest).Wrap(limitErr)
|
||||
}
|
||||
|
||||
return a.SetProfileImageFromFile(c, userID, file)
|
||||
@@ -1593,7 +1593,7 @@ func (a *App) SendPasswordReset(rctx request.CTX, email string, siteURL string)
|
||||
|
||||
result, eErr := a.Srv().EmailService.SendPasswordResetEmail(user.Email, token, user.Locale, siteURL)
|
||||
if eErr != nil {
|
||||
return result, model.NewAppError("SendPasswordReset", "api.user.send_password_reset.send.app_error", nil, "err="+eErr.Error(), http.StatusInternalServerError)
|
||||
return result, model.NewAppError("SendPasswordReset", "api.user.send_password_reset.send.app_error", nil, "", http.StatusInternalServerError).Wrap(eErr)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
|
||||
Ссылка в новой задаче
Block a user