summaryrefslogtreecommitdiffstats
path: root/api4/oauth.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-09-05 17:40:35 -0400
committerJoram Wilander <jwawilander@gmail.com>2017-09-05 17:40:35 -0400
commite30e4cfe3d787e2528419b0d17973eb0fc162d56 (patch)
tree8b6e989dccfe7308786167c0767f4699f28841ae /api4/oauth.go
parent6ca443a2556e5d4bade9a9ef7d6d877bf1d6fc45 (diff)
downloadchat-e30e4cfe3d787e2528419b0d17973eb0fc162d56.tar.gz
chat-e30e4cfe3d787e2528419b0d17973eb0fc162d56.tar.bz2
chat-e30e4cfe3d787e2528419b0d17973eb0fc162d56.zip
PLT-7468 Moved more error pages to use predefined error types (#7378)
* PLT-7468 Moved more errors to use error types * PLT-7468 Moved 404 error page to use error types * Made helper function for rendering external links on error page
Diffstat (limited to 'api4/oauth.go')
-rw-r--r--api4/oauth.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/api4/oauth.go b/api4/oauth.go
index c3586bbdf..ae5035fdc 100644
--- a/api4/oauth.go
+++ b/api4/oauth.go
@@ -392,9 +392,7 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
code := r.URL.Query().Get("code")
if len(code) == 0 {
- err := model.NewAppError("completeOAuth", "api.oauth.complete_oauth.missing_code.app_error", map[string]interface{}{"service": strings.Title(service)}, "URL: "+r.URL.String(), http.StatusBadRequest)
- err.Translate(c.T)
- http.Redirect(w, r, c.GetSiteURLHeader()+"/error?message="+err.Message, http.StatusTemporaryRedirect)
+ http.Redirect(w, r, c.GetSiteURLHeader()+"/error?type=oauth_missing_code&service="+strings.Title(service), http.StatusTemporaryRedirect)
return
}