mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-14 03:27:34 +00:00
change error messages
This commit is contained in:
@@ -8,5 +8,5 @@ export async function loginnameScreen(page: Page, username: string) {
|
||||
|
||||
export async function loginnameScreenExpect(page: Page, username: string) {
|
||||
await expect(page.getByTestId(usernameTextInput)).toHaveValue(username);
|
||||
await expect(page.getByTestId("error").locator("div")).toContainText("Could not find user");
|
||||
await expect(page.getByTestId("error").locator("div")).toContainText("User not found in the system");
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ export default async function Page(props: { searchParams: Promise<any> }) {
|
||||
authRequestId,
|
||||
}).catch((error) => {
|
||||
console.error("Could not resend verification email", error);
|
||||
throw Error("Could not request email");
|
||||
throw Error("Failed to send verification email");
|
||||
});
|
||||
}
|
||||
} else if ("userId" in searchParams && userId) {
|
||||
@@ -54,7 +54,7 @@ export default async function Page(props: { searchParams: Promise<any> }) {
|
||||
authRequestId,
|
||||
}).catch((error) => {
|
||||
console.error("Could not resend verification email", error);
|
||||
throw Error("Could not request email");
|
||||
throw Error("Failed to send verification email");
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -62,7 +62,7 @@ export async function createNewSessionFromIdpIntent(
|
||||
const userResponse = await getUserByID(command.userId);
|
||||
|
||||
if (!userResponse || !userResponse.user) {
|
||||
return { error: "Could not find user" };
|
||||
return { error: "User not found in the system" };
|
||||
}
|
||||
|
||||
const loginSettings = await getLoginSettings(
|
||||
|
@@ -310,7 +310,7 @@ export async function sendLoginname(command: SendLoginnameCommand) {
|
||||
if (resp) {
|
||||
return resp;
|
||||
}
|
||||
return { error: "Could not find user" };
|
||||
return { error: "User not found in the system" };
|
||||
} else if (
|
||||
loginSettings?.allowRegister &&
|
||||
loginSettings?.allowUsernamePassword
|
||||
@@ -371,5 +371,5 @@ export async function sendLoginname(command: SendLoginnameCommand) {
|
||||
|
||||
// fallbackToPassword
|
||||
|
||||
return { error: "Could not find user" };
|
||||
return { error: "User not found in the system" };
|
||||
}
|
||||
|
@@ -167,7 +167,7 @@ export async function sendPasskey(command: SendPasskeyCommand) {
|
||||
const userResponse = await getUserByID(session?.factors?.user?.id);
|
||||
|
||||
if (!userResponse.user) {
|
||||
return { error: "Could not find user" };
|
||||
return { error: "User not found in the system" };
|
||||
}
|
||||
|
||||
const humanUser =
|
||||
|
@@ -123,7 +123,7 @@ export async function sendPassword(command: UpdateSessionCommand) {
|
||||
const userResponse = await getUserByID(session?.factors?.user?.id);
|
||||
|
||||
if (!userResponse.user) {
|
||||
return { error: "Could not find user" };
|
||||
return { error: "User not found in the system" };
|
||||
}
|
||||
|
||||
user = userResponse.user;
|
||||
|
@@ -79,7 +79,7 @@ export async function registerUser(command: RegisterUserCommand) {
|
||||
const userResponse = await getUserByID(session?.factors?.user?.id);
|
||||
|
||||
if (!userResponse.user) {
|
||||
return { error: "Could not find user" };
|
||||
return { error: "User not found in the system" };
|
||||
}
|
||||
|
||||
const humanUser =
|
||||
|
Reference in New Issue
Block a user