fix: contact form
All checks were successful
Build & Deploy / 🔍 Prepare Environment (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Successful in 1m53s
Build & Deploy / 🏗️ Build (push) Successful in 2m8s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🔔 Notifications (push) Successful in 2s

This commit is contained in:
2026-02-09 11:58:59 +01:00
parent cc04b71327
commit 76cf6e7b62
4 changed files with 30 additions and 2021 deletions

View File

@@ -23,15 +23,21 @@ export async function ensureAuthenticated() {
if (adminEmail && password) {
try {
await client.login({ email: adminEmail, password: password });
return;
} catch (e) {
if (typeof window === "undefined") {
getServerAppServices().errors.captureException(e, {
phase: "directus_auth",
phase: "directus_auth_fallback",
});
}
console.error("Failed to authenticate with Directus login fallback:", e);
throw e;
}
}
throw new Error(
"Missing Directus authentication credentials (token or admin email/password)",
);
}
export default client;