-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Reduce error boundaries for connections, sources, destinations and onboarding, add retry button. #12848
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
Conversation
0c1607f
to
2bef0cc
Compare
I wonder about a few spots in the code where we change "steps" but it isn't reflected in the route (ie: Connection workflow and Onboarding workflow). Would that cause any buggy/unexpected behavior with this? I don't think it would and seems like either way it's an improvement over previous behavior. I'm just curious. |
… when navigating to another page
* Update ApiErrorBoundary to include ability to reset enabled by optional prop withRetry
2bef0cc
to
d637b83
Compare
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.
Tested this locally and blocked some requests via the browser dev tools. Seems to work as expected on the pages I tested. Code LGTM
…boarding, add retry button. (airbytehq#12848) * Add retry logic to ApiErrorBoundary component and move boundary one level deeper * Simplify cannot reach message error message on cloud. * Update ApiErrorBoundary to use Button component, add strings to en.json * Add clearOnLocationChange flag to ApiErrorBoundary to clear the error when navigating to another page * Add error boundaries to DestinationItemPage and SourceItemPage * Update ApiErrorBoundary to include ability to reset enabled by optional prop withRetry * Remove location and retry options from ApiErrorBoundary * Add ApiErrorBoundary to onboarding page * Show titles on most onboarding steps even in error * Add the ability to hide the header for ApiErrorBoundaries and BaseClearView * Remove retry logic from state change in ApiErrorBoundary
What
This improves how we handle errors in the app. Previously, any network error would cause the app to go into a blank screen with an error. Now the navigation bar will remain present. Additionally, it enables the user to retry the request.
Related to #12172
Onboarding error:
Source/Connection/Destination list error:

Source/destination settings error:

How
ApiErrorBoundary
component with retry functionality react-query useQueryResetErrorBoundary. Resets on location change.ApiErrorBoundary
to the main routes so that it doesn't error outside of the navigationApiErrorBoundary
component to onboarding, source, destination, and connection components so that it doesn't error the entire pageRecommended reading order
Top to bottom