Skip to content

fix(framework): populate ErrorContext with error and stack trace#182

Merged
qantrepreneur merged 1 commit into
mainfrom
165-error-context
May 17, 2026
Merged

fix(framework): populate ErrorContext with error and stack trace#182
qantrepreneur merged 1 commit into
mainfrom
165-error-context

Conversation

@qantrepreneur
Copy link
Copy Markdown
Contributor

Summary

  • Thread caught error through renderErrorPage into ErrorContext
  • In dev mode: error.message replaces generic status text, stack included
  • In prod: stack omitted, generic message preserved
  • 404 pages (no thrown error) unaffected — error and stack remain undefined

Test plan

  • Unhandled error → ErrorContext.error is the thrown error object
  • Dev mode → ErrorContext.stack populated with stack trace
  • Dev mode → ErrorContext.message is error.message not generic text
  • 404 → no error/stack in ErrorContext
  • Circuit breaker still falls back to bare HTML
  • Full test suite passes (259 tests)

Closes #165

🤖 Generated with Claude Code

…ev mode

Thread the caught error through renderErrorPage so error pages receive the
original error object and stack trace. In dev mode, error.message replaces
the generic status text and stack is included. In prod, stack is omitted.

Closes #165

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@qantrepreneur qantrepreneur merged commit a17cfa8 into main May 17, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request May 17, 2026
qantrepreneur added a commit that referenced this pull request May 21, 2026
…ev mode (#182)

Thread the caught error through renderErrorPage so error pages receive the
original error object and stack trace. In dev mode, error.message replaces
the generic status text and stack is included. In prod, stack is omitted.

Closes #165

Co-authored-by: Lorenzo <lorenzofkramer@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced May 23, 2026
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.

Bug: ErrorContext missing stack trace and original error

1 participant