internal/sessions: error if session too large

This commit is contained in:
Bobby DeSimone 2019-07-06 11:34:49 -07:00
parent 10a1d2fd7e
commit 63043dec9c
No known key found for this signature in database
GPG key ID: AEE4CF12FE86D07E
4 changed files with 53 additions and 3 deletions

View file

@ -278,7 +278,7 @@ func (a *Authenticate) getOAuthCallback(w http.ResponseWriter, r *http.Request)
if err := a.sessionStore.SaveSession(w, r, session); err != nil {
log.Error().Err(err).Msg("authenticate: failed saving new session")
return "", httputil.Error{Code: http.StatusInternalServerError, Message: "Internal Error"}
return "", httputil.Error{Code: http.StatusInternalServerError, Message: err.Error()}
}
return redirect, nil