slim
slim copied to clipboard
Handle errors globally with Error Middleware and React Error Boundary
Summary of the PR:
- Handle all known errors from dicomweb-client, dcmjs, dmv, and the app itself using ErrorMiddleware.js (an extension of pubsub pattern). Errors are now funneled to the onError event. User is notified based on the notification type (configurable, toast and console for now) for each source of error.
- A debug info button is added to the header component. It is subscribed to the onError event and keeps a record of all 3 types of error - Server, Data Parsing, and Viewer.
- ErrorBoundary.tsx : The React error boundary component is responsible for catching (unexpected) rendering errors and displays a modal window as a fallback component. It is currently wrapped around the App component.
@hackermd I am unable to add you as one of the reviewers. Please know this PR is ready for your review. Thanks!
@hackermd I have addressed the requested changes. Please let me know if this can be merged? Thank you.
@hackermd if you could let us know when you might have time to look into this, it would be helpful!
@hackermd comments addressed. Can you please re-review? also, looks like the deploy gh-pages are not working. I think its because of action permissions. https://stackoverflow.com/questions/72851548/permission-denied-to-github-actionsbot
looks like the deploy gh-pages are not working. I think its because of action permissions. https://stackoverflow.com/questions/72851548/permission-denied-to-github-actionsbot
Not sure why this is happening. The settings are correct and it should work. Maybe a quirk related to the moving of the repository to the ImagingDataCommons organization. Could this be an issue with a global org-wide setting?