Skip to content

Commit 56520b7

Browse files
authored
Merge pull request #653 from fritzmg/add-exceptions-to-payload
Add exception to event payload
2 parents 99f3d12 + 278e4fa commit 56520b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/stimulus/assets/dist/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class default_1 extends Controller {
4747
}
4848
}
4949
catch (e) {
50-
this._dispatchEvent('webauthn:assertion:failure', {});
50+
this._dispatchEvent('webauthn:assertion:failure', {exception: e});
5151
return;
5252
}
5353
}
@@ -70,7 +70,7 @@ class default_1 extends Controller {
7070
}
7171
}
7272
catch (e) {
73-
this._dispatchEvent('webauthn:attestation:failure', {});
73+
this._dispatchEvent('webauthn:attestation:failure', {exception: e});
7474
return;
7575
}
7676
}

src/stimulus/assets/src/controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default class extends Controller {
9191
window.location.replace(this.requestSuccessRedirectUriValue);
9292
}
9393
} catch (e) {
94-
this._dispatchEvent('webauthn:assertion:failure', {});
94+
this._dispatchEvent('webauthn:assertion:failure', {exception: e});
9595
return;
9696
}
9797
}
@@ -117,7 +117,7 @@ export default class extends Controller {
117117
window.location.replace(this.creationSuccessRedirectUriValue);
118118
}
119119
} catch (e) {
120-
this._dispatchEvent('webauthn:attestation:failure', {});
120+
this._dispatchEvent('webauthn:attestation:failure', {exception: e});
121121
return;
122122
}
123123
}

0 commit comments

Comments
 (0)