summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/WebAuthnService.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-05-22 12:27:54 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-06-06 22:20:17 -0400
commit2cba0ada3cdf6b7ee37fa5c0b54134160be657a9 (patch)
tree38f6b59f7c60eda90677bc178974f71c877afe0d /packages/backend/src/core/WebAuthnService.ts
parentrender error cause in render-inline-error.ts (diff)
downloadsharkey-2cba0ada3cdf6b7ee37fa5c0b54134160be657a9.tar.gz
sharkey-2cba0ada3cdf6b7ee37fa5c0b54134160be657a9.tar.bz2
sharkey-2cba0ada3cdf6b7ee37fa5c0b54134160be657a9.zip
more use of identifiable errors, improvements to inner error rendering, and more heuristics for is-retryable-error
Diffstat (limited to 'packages/backend/src/core/WebAuthnService.ts')
-rw-r--r--packages/backend/src/core/WebAuthnService.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/core/WebAuthnService.ts b/packages/backend/src/core/WebAuthnService.ts
index 1b75811fff..afd1d68ce4 100644
--- a/packages/backend/src/core/WebAuthnService.ts
+++ b/packages/backend/src/core/WebAuthnService.ts
@@ -121,7 +121,7 @@ export class WebAuthnService {
});
} catch (error) {
this.logger.error(error as Error, 'Error authenticating webauthn');
- throw new IdentifiableError('5c1446f8-8ca7-4d31-9f39-656afe9c5d87', 'verification failed');
+ throw new IdentifiableError('5c1446f8-8ca7-4d31-9f39-656afe9c5d87', 'verification failed', true, error);
}
const { verified } = verification;
@@ -227,7 +227,7 @@ export class WebAuthnService {
requireUserVerification: true,
});
} catch (error) {
- throw new IdentifiableError('b18c89a7-5b5e-4cec-bb5b-0419f332d430', `verification failed: ${error}`);
+ throw new IdentifiableError('b18c89a7-5b5e-4cec-bb5b-0419f332d430', `verification failed`, true, error);
}
const { verified, authenticationInfo } = verification;
@@ -308,7 +308,7 @@ export class WebAuthnService {
});
} catch (error) {
this.logger.error(error as Error, 'Error authenticating webauthn');
- throw new IdentifiableError('b18c89a7-5b5e-4cec-bb5b-0419f332d430', 'verification failed');
+ throw new IdentifiableError('b18c89a7-5b5e-4cec-bb5b-0419f332d430', 'verification failed', true, error);
}
const { verified, authenticationInfo } = verification;