Skip to content

fetch: fix captureStackTrace#3227

Merged
mcollina merged 2 commits intonodejs:mainfrom
Uzlopak:fix-capture-stack-trace
May 10, 2024
Merged

fetch: fix captureStackTrace#3227
mcollina merged 2 commits intonodejs:mainfrom
Uzlopak:fix-capture-stack-trace

Conversation

@Uzlopak
Copy link
Copy Markdown
Contributor

@Uzlopak Uzlopak commented May 8, 2024

Closes #2869

This is an odd bug.

Obviously this is undefined, because nobody will run fetch with the new operator.

So currently if fetch throws, we create a second time the same stacktrace?

Maybe it is wrong and we should set fetchImpl instead of fetch as reference point?

Maybe we can improve the perf, by storing the stackTraceLimit and set it to 0 and after the fetch we reset it. But problem is, that aggregated errors in cause will have no stack trace then?

Loading
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.

avoid containing undici internals in error stacktrace in web api

2 participants