-
Notifications
You must be signed in to change notification settings - Fork 12
feat(edge-apps-library): add error handling utilities #609
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
base: master
Are you sure you want to change the base?
Conversation
- Add error-handling.ts with error utility functions - Update exports in utils/index.ts - Update package dependencies
PR Reviewer Guide 🔍(Review updated until commit a46c174)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to a46c174
Previous suggestionsSuggestions up to commit 67641be
|
- Add tests for setupErrorHandling function - Test display_errors setting behavior and event listener registration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds error handling utilities to the edge-apps-library using the panic-overlay package. The implementation allows developers to optionally display errors on screen during development via a display_errors setting.
Changes:
- Adds
setupErrorHandling()function that configures panic-overlay based on thedisplay_errorssetting - Exports the new error-handling utility through the utils index
- Adds panic-overlay dependency (version 1.0.51) and its transitive dependencies
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/utils/error-handling.ts |
Implements the main error handling setup function |
src/utils/error-handling.test.ts |
Provides test coverage for the error handling utility |
src/utils/index.ts |
Exports the error-handling module for public API access |
src/test/setup.ts |
Adds Node global to test environment for JSDOM compatibility |
package.json |
Adds panic-overlay as a runtime dependency |
bun.lock |
Updates lock file with panic-overlay and transitive dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add display_errors setting to screenly.yml and screenly_qc.yml - Enable error display for debugging purposes
- Add display_errors setting to screenly.yml and screenly_qc.yml - Import and call setupErrorHandling in main.ts
|
Persistent review updated to latest commit a46c174 |
User description
Add error handling utilities to the edge-apps-library
PR Type
Enhancement, Tests
Description
Introduce error handling utilities with panic-overlay
Expose
setupErrorHandlingin utils indexIntegrate error handling in Menu Board and QR Code
Add and configure
display_errorssetting for appsCover utility with unit tests
File Walkthrough
3 files
Add global.Node to test environmentAdd tests for setupErrorHandling behaviorReorder test imports for consistency1 files
Introduce setupErrorHandling with panic-overlay3 files
Export error-handling utilitiesIntegrate setupErrorHandling on loadIntegrate setupErrorHandling on window load1 files
Add panic-overlay dependency4 files
Add `display_errors` setting to configAdd `display_errors` setting to QC configAdd `display_errors` setting to configAdd `display_errors` setting to QC config