Skip to content

Commit

Permalink
Preserve cause when wrapping failure to decode pubkey
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Apr 17, 2019
1 parent e94e12d commit c055550
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,11 +548,14 @@ public void validate() {
try {
key = WebAuthnCodecs.importCoseP256PublicKey(cose);
} catch (CoseException | IOException e) {
throw new IllegalArgumentException(String.format(
"Failed to decode public key: Credential ID: %s COSE: %s",
credential.getCredentialId().getBase64Url(),
cose.getBase64Url()
));
throw new IllegalArgumentException(
String.format(
"Failed to decode public key: Credential ID: %s COSE: %s",
credential.getCredentialId().getBase64Url(),
cose.getBase64Url()
),
e
);
}

if (!
Expand Down

0 comments on commit c055550

Please sign in to comment.