Skip to content

Commit

Permalink
Print auth challenge when parsing fails. (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc authored Dec 9, 2024
1 parent 590792a commit 5f953e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/sip/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,10 @@ authLoop:
if headerVal == nil {
return nil, errors.New("no auth header in response")
}
challenge, err := digest.ParseChallenge(headerVal.Value())
challengeStr := headerVal.Value()
challenge, err := digest.ParseChallenge(challengeStr)
if err != nil {
return nil, err
return nil, fmt.Errorf("invalid challenge %q: %w", challengeStr, err)
}
toHeader := resp.To()
if toHeader == nil {
Expand Down

0 comments on commit 5f953e0

Please sign in to comment.