diff --git a/server/callback.go b/server/callback.go index 1481f6f..8aead36 100644 --- a/server/callback.go +++ b/server/callback.go @@ -33,6 +33,8 @@ func (ce CallbackError) HttpStatus() (code int) { code = http.StatusUnauthorized case CallbackErrorServerError: code = http.StatusInternalServerError + default: + code = http.StatusInternalServerError } return } @@ -47,6 +49,8 @@ func (ce CallbackError) String() (out string) { out = "user unauthorized" case CallbackErrorServerError: out = "internal server error" + default: + out = "unhandled error" } return } diff --git a/server/token.go b/server/token.go index cf87b49..d66b017 100644 --- a/server/token.go +++ b/server/token.go @@ -39,6 +39,8 @@ func (te TokenError) HttpStatus() (code int) { code = http.StatusBadRequest case TokenErrorPending: code = http.StatusBadRequest + default: + code = http.StatusInternalServerError } return } @@ -57,6 +59,8 @@ func (te TokenError) String() (out string) { out = "slow down" case TokenErrorPending: out = "authorization pending" + default: + out = "unhandled error" } return }