- error
- unhandledrejection
- correlation IDs
- redaction
Global error events help capture failures that escaped local handling. Report minimal useful context, redact personal data, and avoid swallowing errors that should still reach developer tools. A visible fallback should preserve the user's work and offer a recovery path.
Logging every object or form value can expose sensitive information.
Install error and unhandled-rejection listeners, trigger a controlled failure, and display a safe recovery message while logging limited details.
Open example.html, inspect example.js, then edit and refresh. For APIs that need an origin, run a local server from the JavaScripts folder.
- Explain the behavior and its limits in your own words.
- Test a normal case and a failure or cleanup case.
- Record when this feature is useful and when a simpler approach is better.