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: error handling fixes #31

Merged
merged 2 commits into from
Jul 27, 2022
Merged

fix: error handling fixes #31

merged 2 commits into from
Jul 27, 2022

Conversation

korvin89
Copy link
Collaborator

No description provided.

@@ -12,7 +12,7 @@ export const CHARTKIT_ERROR_CODE = {

export class ChartKitError extends Error {
readonly code: number | string;
readonly isChartKitError = true;
readonly isCustomError = true;
Copy link
Collaborator Author

@korvin89 korvin89 Jul 27, 2022

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() {
Copy link
Collaborator Author

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)

src/types/index.ts Outdated Show resolved Hide resolved
@korvin89 korvin89 merged commit e20fb9d into main Jul 27, 2022
@korvin89 korvin89 deleted the indicator-fixes branch July 27, 2022 11:59
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.

2 participants