Skip to content
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

fix: add better error handling for transactions' Simple pages #939

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Feb 14, 2024

High Level Overview of Change

This PR has better error handling if there is a bug in a transaction's Simple page. This results in better user experience when something is broken.

This does add a package, react-error-boundary, but the package is very tiny and is quite useful.

Context of Change

I encountered this while using the Explorer.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

TypeScript/Hooks Update

N/A

Before / After

Before: a black screen

After:
image

Test Plan

Copy link
Contributor

@JST5000 JST5000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pdp2121
Copy link
Collaborator

pdp2121 commented Feb 15, 2024

@bugsbunnies Should the message be something similar to the <NoMatch /> component for cohesiveness?

Screenshot 2024-02-15 at 3 59 16 PM

@mvadari
Copy link
Collaborator Author

mvadari commented Feb 15, 2024

@bugsbunnies Should the message be something similar to the <NoMatch /> component for cohesiveness?

I copied the old error message/CSS that was displayed in the Simple page when it wasn't supported for an unknown transaction, before we added support for a default Simple page.

@pdp2121
Copy link
Collaborator

pdp2121 commented Feb 15, 2024

@bugsbunnies Should the message be something similar to the <NoMatch /> component for cohesiveness?

I copied the old error message/CSS that was displayed in the Simple page when it wasn't supported for an unknown transaction, before we added support for a default Simple page.

Make sense!

@bugsbunnies
Copy link
Collaborator

@bugsbunnies Should the message be something similar to the <NoMatch /> component for cohesiveness?

Screenshot 2024-02-15 at 3 59 16 PM

Yeah that makes sense

@mvadari
Copy link
Collaborator Author

mvadari commented Feb 15, 2024

@bugsbunnies Should the message be something similar to the <NoMatch /> component for cohesiveness?

Yeah that makes sense

IMO the current error message is better, because this would exclusively be due to an Explorer error, rather than user error. But I'm happy to edit the CSS if you'd prefer that.

@mvadari
Copy link
Collaborator Author

mvadari commented Feb 21, 2024

image

@mvadari mvadari merged commit cde0d2e into staging Feb 21, 2024
4 checks passed
@mvadari mvadari deleted the tx-error-handline branch February 21, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants