chore(backend): better error message for unsupported attestation (#11333)

This commit is contained in:
Kagami Sascha Rosylight 2023-07-21 00:49:39 +02:00 committed by GitHub
parent df2b61fcc6
commit 64c142b1ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
const procedures = this.twoFactorAuthenticationService.getProcedures();
if (!(procedures as any)[attestation.fmt]) {
throw new Error('unsupported fmt');
throw new Error(`unsupported fmt: ${attestation.fmt}. Supported ones: ${Object.keys(procedures)}`);
}
const verificationData = (procedures as any)[attestation.fmt].verify({