fix(fetch): preserve node error fields across serialization - #42562
fix(fetch): preserve node error fields across serialization#42562Dmitry Gozman (dgozman) wants to merge 1 commit into
Conversation
Serialize the structured fields of a Node.js system error (code, errno, syscall, address, port, hostname) alongside the message, so that callers can classify network failures without parsing the error text. Fixes: microsoft#42532
Test results for "tests 1"7 flaky51341 passed, 1247 skipped Merge workflow run. |
Test results for "MCP"2 failed 8325 passed, 1371 skipped Merge workflow run. |
|
Hi, I'm the Playwright bot and I took a first look at the CI failures. 🟢 The two failures are pre-existing flakes — this PR is clearBoth failing tests are MCP CLI tests that don't touch fetch/error serialization, and both flip verdict across ~2000 runs on unrelated PRs. Nothing here points at this change. DetailsThis PR only changes error serialization for Pre-existing flake / infra
Triaged by the Playwright bot - agent run |
| else | ||
| e = Object.assign(new PlaywrightError(error.error.message), { name: error.error.name }); | ||
| e.stack = error.error.stack || ''; | ||
| parseSystemErrorFields(error.error, e); |
There was a problem hiding this comment.
can we just append it to the message, so that it works across langs?
Summary
code,errno,syscall,address,port,hostname— alongside the message, soAPIRequestContextfailures can be classified without parsing the error text.@protocol/serializers, and copied only when the runtime type matches the protocol type.Fixes #42532