Skip to content

Commit

Permalink
fix: render authrequest id only if possible (#5823)
Browse files Browse the repository at this point in the history
  • Loading branch information
adlerhurst committed May 11, 2023
1 parent 185a4e8 commit 32d33d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/api/ui/login/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,12 @@ func (l *Login) chooseNextStep(w http.ResponseWriter, r *http.Request, authReq *
func (l *Login) renderInternalError(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, err error) {
var msg string
if err != nil {
logging.WithError(err).WithField("auth_req_id", authReq.ID).Error()
log := logging.WithError(err)
if authReq != nil {
log = log.WithField("auth_req_id", authReq.ID)
}
log.Error()

_, msg = l.getErrorMessage(r, err)
}
data := l.getBaseData(r, authReq, "Errors.Internal", "", "Internal", msg)
Expand Down

0 comments on commit 32d33d3

Please sign in to comment.