1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-02 14:26:28 +02:00

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

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({