From 278e4fa095de652511371723b98d5b3472c71e9a Mon Sep 17 00:00:00 2001 From: Fritz Michael Gschwantner Date: Wed, 2 Oct 2024 21:06:01 +0200 Subject: [PATCH] add exception to event payload --- src/stimulus/assets/dist/controller.js | 4 ++-- src/stimulus/assets/src/controller.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stimulus/assets/dist/controller.js b/src/stimulus/assets/dist/controller.js index eecb4de5..920f6e6e 100644 --- a/src/stimulus/assets/dist/controller.js +++ b/src/stimulus/assets/dist/controller.js @@ -47,7 +47,7 @@ class default_1 extends Controller { } } catch (e) { - this._dispatchEvent('webauthn:assertion:failure', {}); + this._dispatchEvent('webauthn:assertion:failure', {exception: e}); return; } } @@ -70,7 +70,7 @@ class default_1 extends Controller { } } catch (e) { - this._dispatchEvent('webauthn:attestation:failure', {}); + this._dispatchEvent('webauthn:attestation:failure', {exception: e}); return; } } diff --git a/src/stimulus/assets/src/controller.ts b/src/stimulus/assets/src/controller.ts index cab7e224..7d94d562 100644 --- a/src/stimulus/assets/src/controller.ts +++ b/src/stimulus/assets/src/controller.ts @@ -91,7 +91,7 @@ export default class extends Controller { window.location.replace(this.requestSuccessRedirectUriValue); } } catch (e) { - this._dispatchEvent('webauthn:assertion:failure', {}); + this._dispatchEvent('webauthn:assertion:failure', {exception: e}); return; } } @@ -117,7 +117,7 @@ export default class extends Controller { window.location.replace(this.creationSuccessRedirectUriValue); } } catch (e) { - this._dispatchEvent('webauthn:attestation:failure', {}); + this._dispatchEvent('webauthn:attestation:failure', {exception: e}); return; } }