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) {
|
export async function loginnameScreenExpect(page: Page, username: string) {
|
||||||
await expect(page.getByTestId(usernameTextInput)).toHaveValue(username);
|
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,
|
authRequestId,
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.error("Could not resend verification email", 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) {
|
} else if ("userId" in searchParams && userId) {
|
||||||
@@ -54,7 +54,7 @@ export default async function Page(props: { searchParams: Promise<any> }) {
|
|||||||
authRequestId,
|
authRequestId,
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.error("Could not resend verification email", 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);
|
const userResponse = await getUserByID(command.userId);
|
||||||
|
|
||||||
if (!userResponse || !userResponse.user) {
|
if (!userResponse || !userResponse.user) {
|
||||||
return { error: "Could not find user" };
|
return { error: "User not found in the system" };
|
||||||
}
|
}
|
||||||
|
|
||||||
const loginSettings = await getLoginSettings(
|
const loginSettings = await getLoginSettings(
|
||||||
|
@@ -310,7 +310,7 @@ export async function sendLoginname(command: SendLoginnameCommand) {
|
|||||||
if (resp) {
|
if (resp) {
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
return { error: "Could not find user" };
|
return { error: "User not found in the system" };
|
||||||
} else if (
|
} else if (
|
||||||
loginSettings?.allowRegister &&
|
loginSettings?.allowRegister &&
|
||||||
loginSettings?.allowUsernamePassword
|
loginSettings?.allowUsernamePassword
|
||||||
@@ -371,5 +371,5 @@ export async function sendLoginname(command: SendLoginnameCommand) {
|
|||||||
|
|
||||||
// fallbackToPassword
|
// 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);
|
const userResponse = await getUserByID(session?.factors?.user?.id);
|
||||||
|
|
||||||
if (!userResponse.user) {
|
if (!userResponse.user) {
|
||||||
return { error: "Could not find user" };
|
return { error: "User not found in the system" };
|
||||||
}
|
}
|
||||||
|
|
||||||
const humanUser =
|
const humanUser =
|
||||||
|
@@ -123,7 +123,7 @@ export async function sendPassword(command: UpdateSessionCommand) {
|
|||||||
const userResponse = await getUserByID(session?.factors?.user?.id);
|
const userResponse = await getUserByID(session?.factors?.user?.id);
|
||||||
|
|
||||||
if (!userResponse.user) {
|
if (!userResponse.user) {
|
||||||
return { error: "Could not find user" };
|
return { error: "User not found in the system" };
|
||||||
}
|
}
|
||||||
|
|
||||||
user = userResponse.user;
|
user = userResponse.user;
|
||||||
|
@@ -79,7 +79,7 @@ export async function registerUser(command: RegisterUserCommand) {
|
|||||||
const userResponse = await getUserByID(session?.factors?.user?.id);
|
const userResponse = await getUserByID(session?.factors?.user?.id);
|
||||||
|
|
||||||
if (!userResponse.user) {
|
if (!userResponse.user) {
|
||||||
return { error: "Could not find user" };
|
return { error: "User not found in the system" };
|
||||||
}
|
}
|
||||||
|
|
||||||
const humanUser =
|
const humanUser =
|
||||||
|
Reference in New Issue
Block a user