michael_pxr
03/14/2024, 3:51 PMsignUpPOST
method in the emailpassword APIs [1] and I'm wondering whether to return {status: 'SIGN_UP_NOT_ALLOWED'; reason: string;}
or {status: "GENERAL_ERROR"; message: string;}
when one of my custom fields is failing a unique constraint. I.e. when a user tries to sign up with a username that is already taken, should I use status SIGN_UP_NOT_ALLOWED
or status GENERAL_ERROR
?
[1]: https://supertokens.com/docs/emailpassword/common-customizations/signup-form/adding-fields#step-3-handle-form-fields-on-successful-sign-up