print mopre detailed error logs

This commit is contained in:
2026-07-13 20:25:52 +02:00
parent 573d063d55
commit d11d360cbf
+2
View File
@@ -27,6 +27,7 @@ const getEnv = () => {
const _env = fullSchema.safeParse(rawEnv); const _env = fullSchema.safeParse(rawEnv);
if (!_env.success) { if (!_env.success) {
console.error("❌ Invalid Server Environment Variables:"); console.error("❌ Invalid Server Environment Variables:");
console.error(JSON.stringify(_env.error.format(), null, 2));
throw new Error("Invalid environment variables"); throw new Error("Invalid environment variables");
} }
return _env.data; return _env.data;
@@ -34,6 +35,7 @@ const getEnv = () => {
const _env = clientSchema.safeParse(rawEnv); const _env = clientSchema.safeParse(rawEnv);
if (!_env.success) { if (!_env.success) {
console.error("❌ Invalid Client Environment Variables:"); console.error("❌ Invalid Client Environment Variables:");
console.error(JSON.stringify(_env.error.format(), null, 2));
throw new Error("Invalid environment variables"); throw new Error("Invalid environment variables");
} }
return _env.data as z.infer<typeof fullSchema>; return _env.data as z.infer<typeof fullSchema>;