mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
fix(webapp): change the error code handler
This commit is contained in:
@@ -98,15 +98,7 @@ export const transformRegisterErrorsToForm = (errors) => {
|
|||||||
export const transformRegisterToastMessages = (errors) => {
|
export const transformRegisterToastMessages = (errors) => {
|
||||||
const toastErrors = [];
|
const toastErrors = [];
|
||||||
|
|
||||||
if (errors.some((e) => e.type === 'SIGNUP_NOT_ALLOWED_EMAIL_DOMAIN')) {
|
if (errors.some((e) => e.type === 'SIGNUP_RESTRICTED_NOT_ALLOWED')) {
|
||||||
toastErrors.push({
|
|
||||||
message:
|
|
||||||
'The sign-up is restricted, the given email domain is not allowed to sign-up.',
|
|
||||||
intent: Intent.DANGER,
|
|
||||||
});
|
|
||||||
} else if (
|
|
||||||
errors.some((e) => e.type === 'SIGNUP_NOT_ALLOWED_EMAIL_ADDRESS')
|
|
||||||
) {
|
|
||||||
toastErrors.push({
|
toastErrors.push({
|
||||||
message:
|
message:
|
||||||
'The sign-up is restricted, the given email address is not allowed to sign-up.',
|
'The sign-up is restricted, the given email address is not allowed to sign-up.',
|
||||||
|
|||||||
Reference in New Issue
Block a user