diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json
index d82967c71..094d45571 100644
--- a/locale/defaultMessages.json
+++ b/locale/defaultMessages.json
@@ -1673,6 +1673,9 @@
"context": "header",
"string": "Hello there, {userName}"
},
+ "ByYtFB": {
+ "string": "Invalid or expired token. Please check your token in URL"
+ },
"C0JLNW": {
"string": "Provided email address does not exist in our database."
},
@@ -7092,6 +7095,9 @@
"context": "PageTypeDeleteWarningDialog single assigned items description",
"string": "You are about to delete page type {typeName}. It is assigned to {assignedItemsCount} {assignedItemsCount,plural,one{page} other{pages}}. Deleting this page type will also delete those pages. Are you sure you want to do this?"
},
+ "tR+UuE": {
+ "string": "User doesn't exist. Please check your email in URL"
+ },
"tTtoKd": {
"context": "error message",
"string": "Sorry, your username and/or password are incorrect. Please try again."
diff --git a/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx b/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx
index 1575065b4..c79ab8c25 100644
--- a/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx
+++ b/src/auth/components/NewPasswordPage/NewPasswordPage.stories.tsx
@@ -10,10 +10,10 @@ storiesOf("Views / Authentication / Set up a new password", module)
.addDecorator(CardDecorator)
.addDecorator(Decorator)
.add("default", () => (
-
- Invalid value + Invalid or expired token. Please check your token in URL
@@ -66014,7 +66058,7 @@ exports[`Storyshots Views / Customers / Create customer form errors 1`] = `- Invalid value + Invalid or expired token. Please check your token in URL
@@ -66062,7 +66106,7 @@ exports[`Storyshots Views / Customers / Create customer form errors 1`] = `- Invalid value + Invalid or expired token. Please check your token in URL
@@ -66103,7 +66147,7 @@ exports[`Storyshots Views / Customers / Create customer form errors 1`] = `- Invalid value + Invalid or expired token. Please check your token in URL
@@ -66147,7 +66191,7 @@ exports[`Storyshots Views / Customers / Create customer form errors 1`] = `- Invalid value + Invalid or expired token. Please check your token in URL
- Invalid value + Invalid or expired token. Please check your token in URL
@@ -66356,7 +66400,7 @@ exports[`Storyshots Views / Customers / Create customer form errors 1`] = `- Invalid value + Invalid or expired token. Please check your token in URL
@@ -66398,7 +66442,7 @@ exports[`Storyshots Views / Customers / Create customer form errors 1`] = `- Invalid value + Invalid or expired token. Please check your token in URL
@@ -66476,7 +66520,7 @@ exports[`Storyshots Views / Customers / Create customer form errors 1`] = `- Invalid value + Invalid or expired token. Please check your token in URL
@@ -69014,7 +69058,7 @@ exports[`Storyshots Views / Customers / Customer details form errors 1`] = `- Invalid value + Invalid or expired token. Please check your token in URL
- Invalid value + Invalid or expired token. Please check your token in URL
diff --git a/src/utils/errors/account.ts b/src/utils/errors/account.ts index 6112083b0..c09a705a0 100644 --- a/src/utils/errors/account.ts +++ b/src/utils/errors/account.ts @@ -37,6 +37,14 @@ const messages = defineMessages({ id: "TDhHMi", defaultMessage: "This needs to be unique", }, + invalidToken: { + id: "ByYtFB", + defaultMessage: "Invalid or expired token. Please check your token in URL", + }, + userNotFound: { + id: "tR+UuE", + defaultMessage: "User doesn't exist. Please check your email in URL", + }, }); interface ErrorFragment { @@ -62,6 +70,10 @@ function getAccountErrorMessage(err: ErrorFragment, intl: IntlShape): string { return intl.formatMessage(messages.tooSimilar); case AccountErrorCode.UNIQUE: return intl.formatMessage(messages.unique); + case AccountErrorCode.INVALID: + return intl.formatMessage(messages.invalidToken); + case AccountErrorCode.NOT_FOUND: + return intl.formatMessage(messages.userNotFound); } }