Timestamp and registration checking
This commit is contained in:
@@ -44,6 +44,12 @@ export default function RegisterPage() {
|
||||
|
||||
if (!res.ok) {
|
||||
const data = await res.json();
|
||||
// Localize known structured codes; fall back to server-supplied
|
||||
// English message for everything else (validation, ZITADEL errors,
|
||||
// generic 500s).
|
||||
if (data.code === "duplicate_domain" && data.domain) {
|
||||
throw new Error(t("duplicateDomain", { domain: data.domain }));
|
||||
}
|
||||
throw new Error(data.error || "Registration failed");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user