fix e2e
This commit is contained in:
@@ -187,7 +187,7 @@ export class SeedDemoUsers {
|
|||||||
passwordHash?: PasswordHash;
|
passwordHash?: PasswordHash;
|
||||||
primaryDriverId?: string;
|
primaryDriverId?: string;
|
||||||
} = {
|
} = {
|
||||||
id: userId,
|
id: existingUser.getId().value,
|
||||||
displayName: spec.displayName,
|
displayName: spec.displayName,
|
||||||
email: spec.email,
|
email: spec.email,
|
||||||
passwordHash: PasswordHash.fromHash(passwordHash),
|
passwordHash: PasswordHash.fromHash(passwordHash),
|
||||||
|
|||||||
@@ -39,7 +39,12 @@ export class BootstrapModule implements OnModuleInit {
|
|||||||
|
|
||||||
// Seed demo users (only in dev/test, respects bootstrap enable flag)
|
// Seed demo users (only in dev/test, respects bootstrap enable flag)
|
||||||
if (await this.shouldSeedDemoUsers()) {
|
if (await this.shouldSeedDemoUsers()) {
|
||||||
await this.seedDemoUsers.execute();
|
try {
|
||||||
|
await this.seedDemoUsers.execute();
|
||||||
|
} catch (error) {
|
||||||
|
this.logger.warn('[Bootstrap] Demo user seeding failed but continuing startup:', error);
|
||||||
|
console.warn('[Bootstrap] Demo user seeding failed but continuing startup:', error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('[Bootstrap] Application data initialized successfully');
|
console.log('[Bootstrap] Application data initialized successfully');
|
||||||
|
|||||||
46
apps/website/app/global-error.tsx
Normal file
46
apps/website/app/global-error.tsx
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
|
export default function GlobalError({
|
||||||
|
error,
|
||||||
|
reset,
|
||||||
|
}: {
|
||||||
|
error: Error & { digest?: string };
|
||||||
|
reset: () => void;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<html lang="en">
|
||||||
|
<body className="antialiased">
|
||||||
|
<main className="min-h-screen flex items-center justify-center bg-deep-graphite text-white px-6">
|
||||||
|
<div className="max-w-md text-center space-y-4">
|
||||||
|
<h1 className="text-3xl font-semibold">Something went wrong</h1>
|
||||||
|
<p className="text-sm text-gray-400">
|
||||||
|
{error?.message ? error.message : 'An unexpected error occurred.'}
|
||||||
|
</p>
|
||||||
|
{error?.digest && (
|
||||||
|
<p className="text-xs text-gray-500 font-mono">
|
||||||
|
Error ID: {error.digest}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
<div className="flex items-center justify-center gap-3 pt-2">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => reset()}
|
||||||
|
className="inline-flex items-center justify-center rounded-md bg-primary-blue px-4 py-2 text-sm font-medium text-white hover:bg-primary-blue/80 transition-colors"
|
||||||
|
>
|
||||||
|
Try again
|
||||||
|
</button>
|
||||||
|
<Link
|
||||||
|
href="/"
|
||||||
|
className="inline-flex items-center justify-center rounded-md bg-iron-gray px-4 py-2 text-sm font-medium text-white hover:bg-iron-gray/80 transition-colors"
|
||||||
|
>
|
||||||
|
Go home
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user