fix: prevent loss of information when returning errors
Some checks reported warnings
Cadoles/bouncer/pipeline/head This commit was not built

Linked to:
- https://sentry.in.nuonet.fr/share/issue/5fa72de1b01b46bc81601958a2ff5fd2/
- https://sentry.in.nuonet.fr/share/issue/5a225f6400a647c0bbf1f7ea01566e63/
This commit is contained in:
2024-11-08 11:07:19 +01:00
parent a686c52aed
commit cffe3eca1b
3 changed files with 6 additions and 6 deletions

View File

@ -69,7 +69,7 @@ func (c *Client) login(w http.ResponseWriter, r *http.Request, sess *sessions.Se
sess.Values[sessionKeyPostLoginRedirectURL] = postLoginRedirectURL
if err := sess.Save(r, w); err != nil {
director.HandleError(ctx, w, r, http.StatusInternalServerError, errors.New("could not save session"))
director.HandleError(ctx, w, r, http.StatusInternalServerError, errors.Wrap(err, "could not save session"))
return
}