From 64c142b1ca569149c32e8ff78fca3ce2055580c2 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Fri, 21 Jul 2023 00:49:39 +0200 Subject: [PATCH] chore(backend): better error message for unsupported attestation (#11333) --- packages/backend/src/server/api/endpoints/i/2fa/key-done.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts index e8985a9cd8..a7e39fc028 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts @@ -103,7 +103,7 @@ export default class extends Endpoint { 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({