Skip to content

Commit

Permalink
add exception to event payload
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg committed Oct 2, 2024
1 parent 99f3d12 commit 278e4fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/stimulus/assets/dist/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class default_1 extends Controller {
}
}
catch (e) {
this._dispatchEvent('webauthn:assertion:failure', {});
this._dispatchEvent('webauthn:assertion:failure', {exception: e});
return;
}
}
Expand All @@ -70,7 +70,7 @@ class default_1 extends Controller {
}
}
catch (e) {
this._dispatchEvent('webauthn:attestation:failure', {});
this._dispatchEvent('webauthn:attestation:failure', {exception: e});
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/stimulus/assets/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 278e4fa

Please sign in to comment.