mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-13 21:36:03 +00:00
show error
This commit is contained in:
@@ -84,6 +84,7 @@ export default async function Page(props: {
|
|||||||
userId,
|
userId,
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
return linkingFailed(branding);
|
return linkingFailed(branding);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,6 +138,7 @@ export default async function Page(props: {
|
|||||||
foundUser.userId,
|
foundUser.userId,
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
return linkingFailed(branding);
|
return linkingFailed(branding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,10 @@ import { getLocale, getTranslations } from "next-intl/server";
|
|||||||
import { Alert, AlertType } from "../../alert";
|
import { Alert, AlertType } from "../../alert";
|
||||||
import { DynamicTheme } from "../../dynamic-theme";
|
import { DynamicTheme } from "../../dynamic-theme";
|
||||||
|
|
||||||
export async function linkingFailed(branding?: BrandingSettings) {
|
export async function linkingFailed(
|
||||||
|
branding?: BrandingSettings,
|
||||||
|
error?: string,
|
||||||
|
) {
|
||||||
const locale = getLocale();
|
const locale = getLocale();
|
||||||
const t = await getTranslations({ locale, namespace: "idp" });
|
const t = await getTranslations({ locale, namespace: "idp" });
|
||||||
|
|
||||||
@@ -11,13 +14,12 @@ export async function linkingFailed(branding?: BrandingSettings) {
|
|||||||
<DynamicTheme branding={branding}>
|
<DynamicTheme branding={branding}>
|
||||||
<div className="flex flex-col items-center space-y-4">
|
<div className="flex flex-col items-center space-y-4">
|
||||||
<h1>{t("linkingError.title")}</h1>
|
<h1>{t("linkingError.title")}</h1>
|
||||||
<div className="w-full">
|
<p className="ztdl-p">{t("linkingError.description")}</p>
|
||||||
{
|
{error && (
|
||||||
<Alert type={AlertType.ALERT}>
|
<div className="w-full">
|
||||||
{t("linkingError.description")}
|
{<Alert type={AlertType.ALERT}>{error}</Alert>}
|
||||||
</Alert>
|
</div>
|
||||||
}
|
)}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</DynamicTheme>
|
</DynamicTheme>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user