Skip to content

feat(app): add global unhandled-error capture hook (#272) - #359

Open
Mirabliss wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
Mirabliss:issue-272-global-error-hook
Open

feat(app): add global unhandled-error capture hook (#272)#359
Mirabliss wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
Mirabliss:issue-272-global-error-hook

Conversation

@Mirabliss

Copy link
Copy Markdown
  • Add useGlobalErrorCapture hook that attaches window 'error' and 'unhandledrejection' listeners and forwards them to the toast store
  • Add renderless GlobalErrorCapture client component wrapping the hook
  • Mount GlobalErrorCapture inside RootLayout so it covers all routes
  • Messages are truncated to 120 chars and also logged via console.error
  • 10 unit tests covering mount/unmount, Error objects, string reasons, null reasons, truncation, and console.error output

Summary

Closes #

Changes

Testing

  • npm run build passes
  • npx tsc --noEmit passes
  • npm test passes (or note any skipped/unrelated failures)

Checklist

…otocol#272)

- Add useGlobalErrorCapture hook that attaches window 'error' and
  'unhandledrejection' listeners and forwards them to the toast store
- Add renderless GlobalErrorCapture client component wrapping the hook
- Mount GlobalErrorCapture inside RootLayout so it covers all routes
- Messages are truncated to 120 chars and also logged via console.error
- 10 unit tests covering mount/unmount, Error objects, string reasons,
  null reasons, truncation, and console.error output
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@Mirabliss Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant