Skip to content

Commit

Permalink
one more place to use logProtocolError
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Nov 12, 2024
1 parent 4e558c3 commit d6692e1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,7 @@ func (u *DynamoUser) FinishLogin(r *http.Request) (*webauthn.Credential, error)
br := fixEncoding(body)
parsedResponse, err := protocol.ParseCredentialRequestResponseBody(br)
if err != nil {
var protocolError *protocol.Error
if errors.As(err, &protocolError) {
log.Printf("failed to parse credential request response body: %s", body)
log.Printf("ProtocolError: %s, DevInfo: %s", protocolError.Details, protocolError.DevInfo)
}
logProtocolError(fmt.Sprintf("failed to parse credential request response body: %s", body), err)
return &webauthn.Credential{}, fmt.Errorf("failed to parse credential request response body: %s", err)
}

Expand Down

0 comments on commit d6692e1

Please sign in to comment.