mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-12607] Migrate to idiomatic error handling in the file app/saml.go in the mattermost-server repo. (#9585) (#9587)
* Refactor function 'GetSamlMetadata' * Run make check-style, make changes
This commit is contained in:
committed by
George Goldberg
parent
f025e749a9
commit
a47c61107b
@@ -20,11 +20,11 @@ func (a *App) GetSamlMetadata() (string, *model.AppError) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if result, err := a.Saml.GetMetadata(); err != nil {
|
||||
result, err := a.Saml.GetMetadata()
|
||||
if err != nil {
|
||||
return "", model.NewAppError("GetSamlMetadata", "api.admin.saml.metadata.app_error", nil, "err="+err.Message, err.StatusCode)
|
||||
} else {
|
||||
return result, nil
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func WriteSamlFile(fileData *multipart.FileHeader) *model.AppError {
|
||||
|
||||
Reference in New Issue
Block a user