summaryrefslogtreecommitdiffstats
path: root/utils/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/api.go')
-rw-r--r--utils/api.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/utils/api.go b/utils/api.go
index d175e0c13..b206951e1 100644
--- a/utils/api.go
+++ b/utils/api.go
@@ -35,13 +35,8 @@ func GetOriginChecker(r *http.Request) OriginCheckerProc {
}
func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request) {
- T, _ := GetTranslationsAndLocale(w, r)
-
- title := T("api.templates.error.title", map[string]interface{}{"SiteName": ClientCfg["SiteName"]})
message := err.Message
details := err.DetailedError
- link := "/"
- linkMessage := T("api.templates.error.link")
status := http.StatusTemporaryRedirect
if err.StatusCode != http.StatusInternalServerError {
@@ -51,10 +46,7 @@ func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request)
http.Redirect(
w,
r,
- "/error?title="+url.QueryEscape(title)+
- "&message="+url.QueryEscape(message)+
- "&details="+url.QueryEscape(details)+
- "&link="+url.QueryEscape(link)+
- "&linkmessage="+url.QueryEscape(linkMessage),
+ "/error?message="+url.QueryEscape(message)+
+ "&details="+url.QueryEscape(details),
status)
}