summaryrefslogtreecommitdiff
path: root/pkg/backend
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/backend')
-rw-r--r--pkg/backend/api.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go
index 1985e6b..ea148f7 100644
--- a/pkg/backend/api.go
+++ b/pkg/backend/api.go
@@ -18,7 +18,11 @@ func Login(username, password string) {
success, err := ctx.bm.DoLogin(username, password)
if err != nil {
log.Printf("Error on login: %v", err)
- ctx.Errors = "bad_auth"
+ if err.Error() == "Cannot get token: Error 502" {
+ ctx.Errors = "bad_auth_502"
+ } else {
+ ctx.Errors = "bad_auth"
+ }
} else if success {
log.Printf("Logged in as %s", username)
ctx.LoginOk = true