Files
compiler-explorer/static
Matt GodboltandClaude d491362f29 Extract diagnostic info from Safari CustomEvent rejections
Fixes #8172
Fixes COMPILER-EXPLORER-DXM

Safari sometimes rejects promises with CustomEvent/Event objects instead
of Error objects. When JSON.stringify() is called on these Event objects,
it returns '{}' because Event properties are non-enumerable.

This fix extracts useful diagnostic properties (type, target, detail)
from Event/CustomEvent objects before creating the error message,
providing actionable information instead of empty objects.

Changes:
- Add isEventLike() type guard to detect Event/CustomEvent objects
- Add formatEventRejection() to extract meaningful Event properties
- Refactor unhandledrejection handler with cleaner ternary chain
- Use Object.assign() for type-safe property addition
- Add references to GitHub issue and related Sentry SDK issue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 15:04:44 -05:00
..
2025-07-28 10:34:46 -05:00
2025-07-28 10:34:46 -05:00
2025-06-19 08:46:57 -05:00
2025-09-12 14:23:49 -05:00
2025-06-18 09:04:23 -05:00
2025-07-28 10:34:46 -05:00
2025-04-24 12:10:37 -05:00
2025-07-28 10:34:46 -05:00