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: do not fail when extend error with snippet #584

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

DudaGod
Copy link
Member

@DudaGod DudaGod commented Aug 1, 2024

No description provided.

@@ -331,7 +331,7 @@ const cloneError = <T extends Error>(error: T): T => {
};

export const mergeSnippetIntoErrorStack = <T extends Error>(error: T & { snippet?: string }): T => {
if (!error.snippet) {
if (!error || !error.snippet) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem was reproduced by the user a couple of times, but i can't reproduce it on the same project. So add this condition in order to not fail here anymore.

@DudaGod
Copy link
Member Author

DudaGod commented Aug 1, 2024

It looks like there is nothing to review, so I merge it.

@DudaGod DudaGod force-pushed the TESTPLANE-163.handle_error_with_snippet branch from 9502faf to d6ff05f Compare August 1, 2024 09:41
@DudaGod DudaGod merged commit 0c0a39a into master Aug 1, 2024
4 checks passed
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.

1 participant