fix: error handling now displays page correctly, fixes #10777

This commit is contained in:
Torkel Ödegaard
2018-02-06 12:28:17 +01:00
parent 6e68c2069e
commit 0e61a670bb
7 changed files with 64 additions and 72 deletions
+2 -2
View File
@@ -40,14 +40,14 @@ func GenStateString() string {
func OAuthLogin(ctx *middleware.Context) {
if setting.OAuthService == nil {
ctx.Handle(404, "login.OAuthLogin(oauth service not enabled)", nil)
ctx.Handle(404, "OAuth not enabled", nil)
return
}
name := ctx.Params(":name")
connect, ok := social.SocialMap[name]
if !ok {
ctx.Handle(404, "login.OAuthLogin(social login not enabled)", errors.New(name))
ctx.Handle(404, fmt.Sprintf("No OAuth with name %s configured", name), nil)
return
}