Commit 4d64142
fix(node): Guard against null
On Node 22+ with Next.js 15, the bundled `@mswjs/interceptors` emits a
synthetic `response` event on request timeout/abort whose `IncomingMessage`
has `httpVersion === null`. `_getOutgoingRequestEndedSpanData` called
`httpVersion.toUpperCase()` unguarded, which crashed the process with an
unhandled rejection. The sibling server-side code in
`httpServerSpansIntegration` already optional-chains this attribute; this
brings the client path in line.
Fixes #20415
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>httpVersion in outgoing request span attributes1 parent 617fede commit 4d64142
1 file changed
Lines changed: 4 additions & 1 deletion
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
463 | 466 | | |
464 | 467 | | |
465 | 468 | | |
| |||
0 commit comments