Customize error message

I am trying to show the error at create custom script for custom database as:

   auth0_dialog.show({languageDictionary: {
      error: {
       ValidationError: {
         'already_exist': ' My custom already exist error'
       }
      }
    });

and in the create script:

return callback(new ValidationError('already_exist', res.reason));

However, I just get the error:

We're sorry, something went wrong when attempting to sign up.

here is my response from custom create:

{"name":"ValidationError","message":"already exist","code":"already_exist","description":"already exist","fromSandbox":true,"statusCode":400}

Unfortunately, I could not find any details at docs here: Customize Lock Error Messages , How would I know the correct key to use for my case?

Kindly advice

Hey @hopewise,

Looks like you might be looking for something along these lines (according to i18n/en.js):

error: {
   signUp: { 
      user_exists: 'The user already exists.',
    }
}

Cheers!

Thank you @art.rosnovsky

Glad you got it working now @hopewise!

Thanks for great community :+1:

Thanks a lot for those kind words!