-
Notifications
You must be signed in to change notification settings - Fork 883
Feat: Add UI ErrorBoundary #1013
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
Comments
Hey team! Please add your planning poker estimate with ZenHub @presleyp @vapurrmaid |
This is a good first issue for KP, as it deals with a v1 -> v2 port/cleanup, including:
|
Kira-Pilot
added a commit
that referenced
this issue
May 19, 2022
Kira-Pilot
added a commit
that referenced
this issue
May 20, 2022
* added error boundary and error ui components * add body txt and standardize btn size * added story * feat: added error boundary closes #1013 * committing lockfile * added email body to help link
kylecarbs
pushed a commit
that referenced
this issue
Jun 10, 2022
* added error boundary and error ui components * add body txt and standardize btn size * added story * feat: added error boundary closes #1013 * committing lockfile * added email body to help link
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
In v1 of Coder, we use a React error boundary to capture runtime exceptions for better presentation and support.
For a demonstration of what this looks like, see the screenshot on our v1 documentation at https://coder.com/docs/coder/latest/feedback#reporting-a-problem
Details
The code for the error boundary is located at
product/coder/site/src/AppProviderErrorBoundary.tsx
in v1.This code can't be ported directly, there are some providers and contexts we don't have in v2. For example, the user now comes from xstate.
The error boundary is kept light and just passes information to a pure presentational component. In V1 we called this component
Fallback
.Fallback Component
There's a component definition, test and storybook located at
product/coder/site/src/pages
in V1. There are some fetches and additional logs we populate that may not be applicable yet in V2.A good start to have the error boundary in place would list just the error and information about the user, and nothing else. Therefore this component can be greatly simplified.
The text was updated successfully, but these errors were encountered: