-
Notifications
You must be signed in to change notification settings - Fork 5
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: error handling fixes #31
Conversation
@@ -12,7 +12,7 @@ export const CHARTKIT_ERROR_CODE = { | |||
|
|||
export class ChartKitError extends Error { | |||
readonly code: number | string; | |||
readonly isChartKitError = true; | |||
readonly isCustomError = true; |
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.
To easier compatibility with old code in DL. It will be changed to isChartKitError
later
@@ -20,7 +20,7 @@ export class ErrorBoundary extends React.Component<Props, State> { | |||
error: undefined, | |||
}; | |||
|
|||
componentDidUpdate() { | |||
componentDidCatch() { |
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.
componentDidCatch
definitely invoked in case of error (unlike componentDidUpdate
)
No description provided.