MM-45991 Wrap errors (#20785)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8e0d46e0c6
Коммит
a28a967eba
@@ -289,11 +289,11 @@ func (api *PluginAPI) CreateSession(session *model.Session) (*model.Session, *mo
|
||||
func (api *PluginAPI) ExtendSessionExpiry(sessionID string, expiresAt int64) *model.AppError {
|
||||
session, err := api.app.ch.srv.userService.GetSessionByID(sessionID)
|
||||
if err != nil {
|
||||
return model.NewAppError("extendSessionExpiry", "app.session.get_sessions.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
return model.NewAppError("extendSessionExpiry", "app.session.get_sessions.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
}
|
||||
|
||||
if err := api.app.ch.srv.userService.ExtendSessionExpiry(session, expiresAt); err != nil {
|
||||
return model.NewAppError("extendSessionExpiry", "app.session.extend_session_expiry.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
return model.NewAppError("extendSessionExpiry", "app.session.extend_session_expiry.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -852,7 +852,7 @@ func (api *PluginAPI) SendMail(to, subject, htmlBody string) *model.AppError {
|
||||
}
|
||||
|
||||
if err := api.app.Srv().EmailService.SendNotificationMail(to, subject, htmlBody); err != nil {
|
||||
return model.NewAppError("SendMail", "plugin_api.send_mail.missing_htmlbody", nil, err.Error(), http.StatusInternalServerError)
|
||||
return model.NewAppError("SendMail", "plugin_api.send_mail.missing_htmlbody", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Ссылка в новой задаче
Block a user