-
Notifications
You must be signed in to change notification settings - Fork 3
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
[MNT] Implemented error boundary #406
Conversation
Reviewer's Guide by SourceryThis PR implements an error boundary component to handle runtime errors gracefully. The error boundary is implemented as a class component that catches JavaScript errors anywhere in the component tree and displays a fallback UI with the Neurobagel logo and an error message that directs users to the GitHub issues page. Class diagram for the new ErrorBoundary componentclassDiagram
class ErrorBoundary {
- boolean hasError
+ constructor(props: ErrorBoundaryProps)
+ static getDerivedStateFromError(): ErrorBoundaryState
+ componentDidCatch(error: Error, info: React.ErrorInfo): void
+ render(): React.ReactNode
}
class ErrorBoundaryProps {
React.ReactNode children
}
class ErrorBoundaryState {
boolean hasError
}
ErrorBoundary --> ErrorBoundaryProps
ErrorBoundary --> ErrorBoundaryState
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Deploy Preview for neurobagel-query ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Thanks @rmanaem, this looks awesome!
🧑🍳
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.
🧑🍳
NOTE: If this pull request is to be released, the release label must be applied once the review process is done to avoid the local and remote from going out of sync as a consequence of the
bump version
workflow runChecklist
This section is for the PR reviewer
[ENH]
,[FIX]
,[REF]
,[TST]
,[CI]
,[MNT]
,[INF]
,[MODEL]
,[DOC]
) (see our Contributing Guidelines for more info)skip-release
(to be applied by maintainers only)Closes #XXXX
query-tool-results
files in the neurobagel_examples repo have been regeneratedFor new features:
For bug fixes:
Summary by Sourcery
Implement an ErrorBoundary component to enhance error handling in the application by wrapping the main component, ensuring that errors are caught and displayed with a user-friendly message.
New Features:
Enhancements: