Skip to content

Commit

Permalink
Merge pull request #653 from fritzmg/add-exceptions-to-payload
Browse files Browse the repository at this point in the history
Add exception to event payload
  • Loading branch information
Spomky authored Oct 3, 2024
2 parents 99f3d12 + 278e4fa commit 56520b7
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 56520b7

Please sign in to comment.