Implements componentDidCatch on App, as well as backup handlers for the global error and unhandledrejection events. Whenever one of these hits, we render an ErrorScreen component which displays the error, has a link to reload the app, and a link to GitHub with an issue pre-filled out.
There are still some improvements that could be made:
The pre-filled issue should probably ask the user for some info
The pre-filled issue should probably include some system information (Junction version, bitcoind version, OS etc.)
How does the native app currently handle target="_blank" URLs? It should ideally open the user's preferred browser.
Is reloading the app browser window enough, or should it do a full quit and restart of the app?
Steps to Test
Intentionally do something errorous in a component render method, confirm the error screen works
Intentionally do something errorous inside of an async function (e.g. Wallet.tsx's generateAddress) and confirm the error screen works, just with less info
Screenshots
Error screen
Pre-filled GH issue
I truncated and showed preview instead of editor, but the user would be able to add notes if they wished and the full errors would be there.
What This Does
Implements
componentDidCatch
onApp
, as well as backup handlers for the globalerror
andunhandledrejection
events. Whenever one of these hits, we render anErrorScreen
component which displays the error, has a link to reload the app, and a link to GitHub with an issue pre-filled out.There are still some improvements that could be made:
target="_blank"
URLs? It should ideally open the user's preferred browser.Steps to Test
Wallet.tsx
'sgenerateAddress
) and confirm the error screen works, just with less infoScreenshots
Error screen
Pre-filled GH issue
I truncated and showed preview instead of editor, but the user would be able to add notes if they wished and the full errors would be there.