# An error occurred at login modal (same as topic 293167)

**URL:** <https://meta.discourse.org/t/an-error-occurred-at-login-modal-same-as-topic-293167/293720>\
**Category:** Bug\
**Tags:** passkey\
**Created:** [February 1, 2024, 12:38am UTC](https://meta.discourse.org/t/an-error-occurred-at-login-modal-same-as-topic-293167/293720 "2024-02-01T00:38:15Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [February 1, 2024, 1:17am UTC](https://meta.discourse.org/t/an-error-occurred-at-login-modal-same-as-topic-293167/293720/5 "2024-02-01T01:17:43Z")

</div>

This is a regression introduced here: [FEATURE: Allow users to confirm session with passkeys (#24337) · discourse/discourse@c6ead3f · GitHub](https://github.com/discourse/discourse/commit/c6ead3f5c4de128592748d73acdb8c525730bc5b)

> <https://github.com/discourse/discourse/blob/c6ead3f5c4de128592748d73acdb8c525730bc5b/app/assets/javascripts/discourse/app/lib/webauthn.js#L136>

I think the code needs to be moved in the `try{}` below; otherwise, the error will use the UI instead of the console.

> <https://github.com/discourse/discourse/blob/c6ead3f5c4de128592748d73acdb8c525730bc5b/app/assets/javascripts/discourse/app/lib/webauthn.js#L173>

---

_[View the full topic](https://meta.discourse.org/t/an-error-occurred-at-login-modal-same-as-topic-293167/293720)._
