slim icon indicating copy to clipboard operation
slim copied to clipboard

Handle errors globally with Error Middleware and React Error Boundary

Open GitanjaliChhetri opened this issue 2 years ago • 1 comments

Summary of the PR:

  1. 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.
  2. 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.
  3. 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.

image image image

GitanjaliChhetri avatar Nov 19 '22 05:11 GitanjaliChhetri

@hackermd I am unable to add you as one of the reviewers. Please know this PR is ready for your review. Thanks!

GitanjaliChhetri avatar Nov 28 '22 16:11 GitanjaliChhetri

@hackermd I have addressed the requested changes. Please let me know if this can be merged? Thank you.

GitanjaliChhetri avatar Jan 19 '23 22:01 GitanjaliChhetri

@hackermd if you could let us know when you might have time to look into this, it would be helpful!

fedorov avatar Jan 27 '23 21:01 fedorov

@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

igoroctaviano avatar Apr 03 '23 15:04 igoroctaviano

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?

hackermd avatar Apr 13 '23 06:04 hackermd