Skip to content

Commit

Permalink
Add better logging when freeipa server ping fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
aebruno committed Jul 15, 2020
1 parent 583f30d commit 734e39a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func (h *Handler) tryAuth(uid, password string) (string, error) {
// Ping to get sessionID for later use
_, err = client.Ping()
if err != nil {
log.WithFields(log.Fields{
"uid": uid,
"ipa_client_error": err,
}).Error("Failed to ping FreeIPA")
return "", errors.New("Error contacting FreeIPA")
}

Expand Down

0 comments on commit 734e39a

Please sign in to comment.