mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
Fix server-side error message leaking to browser in production
error.message was displayed to users in all environments, while stack traces were correctly gated behind import.meta.env.DEV. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
41ed815a19
commit
f8d96cb7ae
1 changed files with 1 additions and 1 deletions
|
|
@ -72,8 +72,8 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
|
|||
message = error.statusText || message;
|
||||
}
|
||||
} else if (error instanceof Error) {
|
||||
message = error.message;
|
||||
if (import.meta.env.DEV) {
|
||||
message = error.message;
|
||||
stack = error.stack;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue