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(node): Apply source context to linked errors even when it is uncached #8453

Merged
merged 2 commits into from Jul 5, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented Jul 5, 2023

When I looked into the linked errors integration to implement support for Aggregate erros I noticed that in the node linked errors integration we had an await that did nothing.

This was a bit curios to me since all of the functions in the node linked errors integration were async just because of that await. Looking into it some more it seems that we used the wrong funciton of the context lines integration to attach source context. We were only attaching source context if the file was in our file cache - this operation is synchronous. We basically just called the wrong fuction of the context lines integration (addSourceContextToFrames instead of addSourceContext).

This pr changes the node linked errors integration to add source (cached AND uncached) source context to linked errors after they have been attached to the event. Also gets rid of some unnecessary sync promise, async await shenanigans.

@lforst lforst changed the title fix(node): Apply source context to linked errors when it is uncached fix(node): Apply source context to linked errors even when it is uncached Jul 5, 2023
@lforst lforst merged commit c55943f into develop Jul 5, 2023
46 checks passed
@lforst lforst deleted the lforst-fix-source-context-for-node-linked-errors branch July 5, 2023 09: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.

None yet

2 participants