coopermaruyama/react-web3

Feature: <Web3CustomErrorMessage /> named export

Closed this issue · 3 comments

Would be nice to be able to throw up custom error messages using a screen that users are already used to.

Hey ron! What do you mean by "screen that user's are already used to?" If you look at the docs, the two screens that are used can be replaced via optional props.

Or, do you mean the errors thrown by web3.js itself? e.g. catching any exceptions thrown by it and displaying a message for it?

@rongierlach

Sorry for confusing, I'm not suggesting you do additional error handling.

Internally you have <Web3Unavailable /> and <AccountUnavailable /> which are nearly identical components save for their copy. I'm suggesting you export a template component that accounts for not just both of these but also any custom error displays a user might wish to present.

I'd catch some ethereum related error and throw up this template component with my custom copy in place.

This should make more sense: #8