# Wrong verification code for passwordless login shows "WE'RE SORRY, SOMETHING WENT WRONG" message to user

**URL:** <https://community.auth0.com/t/wrong-verification-code-for-passwordless-login-shows-were-sorry-something-went-wrong-message-to-user/56274>\
**Category:** Get Help\
**Tags:** lock\
**Created:** [January 15, 2021, 7:59pm UTC](https://community.auth0.com/t/wrong-verification-code-for-passwordless-login-shows-were-sorry-something-went-wrong-message-to-user/56274 "2021-01-15T19:59:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe-FS](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@Joe-FS](https://community.auth0.com/u/Joe-FS)\
**Post date:** [January 15, 2021, 7:59pm UTC](https://community.auth0.com/t/wrong-verification-code-for-passwordless-login-shows-were-sorry-something-went-wrong-message-to-user/56274/1 "2021-01-15T19:59:52Z")

</div>

When the user types an invalid code in lock it shows the error “WE’RE SORRY, SOMETHING WENT WRONG”.

Looking at the network trace – the server responds with:  
`{"error":"invalid_user_password","error_description":"Wrong email or verification code."}`

Looking at the github code: [lock/en.js at 8693831e5b62090178d657e99da0ed18ecae1277 · auth0/lock · GitHub](https://github.com/auth0/lock/blob/8693831e5b62090178d657e99da0ed18ecae1277/src/i18n/en.js#L39)

It seems that there is no `key` for the `invalid_user_password`.

What is the recommended strategy to provide a better error message to the user?

Thanks.

---

<div class="post-metadata">

**Author:** ![kstrongholte](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kstrongholte/32/16354_2.png) [@kstrongholte](https://community.auth0.com/u/kstrongholte)\
**Post date:** [January 15, 2021, 10:17pm UTC](https://community.auth0.com/t/wrong-verification-code-for-passwordless-login-shows-were-sorry-something-went-wrong-message-to-user/56274/2 "2021-01-15T22:17:34Z")

</div>

Hi @Joe-FS,

You can customize Lock error messages via the [Language Dictionary](https://auth0.com/docs/libraries/lock/customize-lock-error-messages).

For example:

```auto
languageDictionary = { 
        title: config.dict.signin.title,
        error: {
          passwordless: {
           // User enters incorrect code
            invalid_user_password: 'Wrong password',
           // User does not enter code (i.e. leaves field blank)
            'bad.verification_code': 'Bad verification code'
          }
        }
      };

```

![Screen Shot 2021-01-15 at 14.15.26](https://global.discourse-cdn.com/auth0/original/3X/6/2/6275c11a57fa2408b9fffb59d3bad316aa5a244e.png) ![Screen Shot 2021-01-15 at 14.08.50](https://global.discourse-cdn.com/auth0/original/3X/6/0/60f3850867701ffd41d072ca27ad49607096f033.png)

---

<div class="post-metadata">

**Author:** ![Joe-FS](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@Joe-FS](https://community.auth0.com/u/Joe-FS)\
**Post date:** [January 15, 2021, 11:34pm UTC](https://community.auth0.com/t/wrong-verification-code-for-passwordless-login-shows-were-sorry-something-went-wrong-message-to-user/56274/3 "2021-01-15T23:34:22Z")

</div>

Awesome will give that a shot.

Guidance is much appreciated!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [January 28, 2021, 3:44pm UTC](https://community.auth0.com/t/wrong-verification-code-for-passwordless-login-shows-were-sorry-something-went-wrong-message-to-user/56274/4 "2021-01-28T15:44:27Z")

</div>

Hey there!

Have you had a a chance to test it out?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 12, 2021, 3:44pm UTC](https://community.auth0.com/t/wrong-verification-code-for-passwordless-login-shows-were-sorry-something-went-wrong-message-to-user/56274/5 "2021-02-12T15:44:29Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
