Auth0 Home Blog Docs

Custom Error Message

Hi,

I working on a a project in which a user will be created and updated using Management API in Auth0. I want to return custom error messages from Auth0 in case of data validations.
For example if i am creating a user with duplicate username instead of returning “The username provided is in use already.” i want Auth0 to return “The phonenumber provided is in use already.” because in my business process phone number is stored in username and i want Auth0 to return meaningfull message instead i have to do string manipulation on my end to see if there is issue of duplicate username.

Quick response will be highly apreciated.

Thanks,
Farheen Qaiser

Hi @farheen.qaiser,

Welcome back to the community.

There is no way to customize the error messages returned from the auth0 management api. You can create a M2M application that acts as a proxy to validate these and create the custom behavior you desire.

Hope this helps!

Thanks,
Dan

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