-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add retry method to share link dialog in case of error #4276
Conversation
|
||
let mapUri = | ||
new RegExp(/\/\/# sourceMappingURL=(.*)/).exec(currentScriptContent)?.[1] || | ||
'' | ||
mapUri = new URL(mapUri, uri).href + uriQuery | ||
|
||
const map = await (await fetch(mapUri)).json() | ||
|
||
const map = new SourceMapConsumer(await myfetchjson(mapUri)) |
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.
this is a bonus optimization. if the stack trace goes through 20 stack frames of mobx-state-tree function calls, then it was reparsing the stack trace 20 times which added up to 5 seconds of waiting for the stack trace. this parses it just once
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4276 +/- ##
==========================================
- Coverage 62.60% 62.57% -0.03%
==========================================
Files 1087 1087
Lines 31404 31416 +12
Branches 7497 7499 +2
==========================================
Hits 19659 19659
- Misses 11572 11581 +9
- Partials 173 176 +3 ☔ View full report in Codecov by Sentry. |
4b98b36
to
bf21437
Compare
not sure i understand, do you have a screen recording? note that chunk loading errors are a particular case of this that may be tricky to add retry functionality for #3523 |
f427be3
to
3e6519a
Compare
You can see it in the screenshot -- the button options to bookmark, copy, close disappear |
gotcha. possibly adding another "ErrorBoundary" could catch it but i'm not sure where. the error boundary you are seeing in that screenshot is likely this one jbrowse-components/packages/core/ui/Dialog.tsx Lines 71 to 88 in 3e6519a
|
example screenshot of new error box with the refresh icon
changes the text "Show stack trace" to the "Report" icon, and optionally displays a refresh icon if a "onReset" callback is passed to ErrorMessage
fixes #4274