Mercurial > gemma
diff pkg/controllers/token.go @ 536:d9dbb6139760
Log errors in JSON handler and login controller.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 29 Aug 2018 11:22:04 +0200 |
parents | 7474e9922ed5 |
children | 7934b5c1a910 |
line wrap: on
line diff
--- a/pkg/controllers/token.go Wed Aug 29 10:34:46 2018 +0200 +++ b/pkg/controllers/token.go Wed Aug 29 11:22:04 2018 +0200 @@ -25,6 +25,7 @@ http.NotFound(rw, req) return case err != nil: + log.Printf("error: %v\n", err) http.Error(rw, fmt.Sprintf("error: %v", err), http.StatusInternalServerError) return } @@ -78,6 +79,7 @@ string(input.User), input.Password) if err != nil { + log.Printf("error: %v\n", err) http.Error(rw, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized) return }