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: propagate stack-trace across async #5925

Closed
wants to merge 5 commits into from

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented Sep 28, 2023

Fixes #2387.

  • fix
  • test

@ikonst
Copy link
Contributor Author

ikonst commented Sep 28, 2023

I need to add tests that exercise this, but wanted to validate the approach.

@Frondor
Copy link

Frondor commented Sep 29, 2023

LGTM, I'd also revert the changes introduced in this attempt #4624

@ikonst
Copy link
Contributor Author

ikonst commented Sep 29, 2023

If you revert it, you'd have no stack trace from what happened after the callback.

@ikonst
Copy link
Contributor Author

ikonst commented Oct 5, 2023

A different solution might be to double-down on Node 12+ async stack traces by converting the callbacks to awaited promises. This way we don't have to track anything on our own, but we still have to be mindful of those "callback" boundaries. I'll try this approach in a separate PR and see what comes out better.

@ikonst
Copy link
Contributor Author

ikonst commented Oct 5, 2023

No, wait, there are multiple non-awaits within node's own code related to HTTP and sockets.

@ikonst
Copy link
Contributor Author

ikonst commented Oct 6, 2023

➡️ #5987

@ikonst ikonst closed this Oct 6, 2023
@ikonst ikonst deleted the propagate-stack-trace branch October 6, 2023 15:42
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.

Improve axios stack traces
2 participants