Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): fix broken entry.server.tsx error handler #88

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

gregory-j-baker
Copy link
Contributor

A bad getLogger() line in entry.server.tsx was throwing, causing all errors to be misreported in the logging console.

Before:

2025-01-15T11:46:46.705Z   ERROR --- […rver/express/handlers.ts]: Unexpected error caught by express server Cannot read properties of undefined (reading 'getLogger') --- {
  stack: "TypeError: Cannot read properties of undefined (reading 'getLogger')\n" +
    '    at handleError (/home/gbaker/Projects/github/dts-stn/future-sir/frontend/app/entry.server.tsx:64:37)\n' +
...

After:

2025-01-15T11:47:04.449Z   ERROR --- [     app/entry.server.tsx]: Uncaught error while handling request: --- {
  name: 'AppError',
  errorCode: 'RTE-0001',
  correlationId: 'J4-GX3W29',
  httpStatusCode: 500,
  msg: 'No route found for /en/public/wizard/ (this should never happen)',
  ...

@gregory-j-baker gregory-j-baker enabled auto-merge (squash) January 15, 2025 11:51
@gregory-j-baker gregory-j-baker merged commit 2a24be8 into main Jan 15, 2025
6 checks passed
@gregory-j-baker gregory-j-baker deleted the GjB/fix-error-handler branch January 15, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants