User friendly error messages during OAUTH and SAML flows (#16795)
* Renders error messages in webapp * Added unit test Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9aaf29ffb4
Коммит
01e83f64da
@@ -111,13 +111,9 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
handleError := func(err *model.AppError) {
|
||||
if isMobile {
|
||||
if isMobile && hasRedirectURL {
|
||||
err.Translate(c.App.T)
|
||||
if hasRedirectURL {
|
||||
utils.RenderMobileError(c.App.Config(), w, err, redirectURL)
|
||||
} else {
|
||||
w.Write([]byte(err.ToJson()))
|
||||
}
|
||||
utils.RenderMobileError(c.App.Config(), w, err, redirectURL)
|
||||
} else {
|
||||
c.Err = err
|
||||
c.Err.StatusCode = http.StatusFound
|
||||
|
||||
Ссылка в новой задаче
Block a user