Commit 4d256a6
fix(bun): wrap response body drain in try/catch for sync errors
The `void response.text().catch(() => {})` pattern only handles async
promise rejections. If `response.text` is not a function, a synchronous
TypeError is thrown before `.catch()` is reached, rejecting the entire
promise chain and preventing the transport from returning status/headers.
Wrap in try/catch to handle both:
- try/catch: synchronous TypeError (response.text not a function)
- .catch(): async rejection (body read fails mid-stream)1 parent 319f434 commit 4d256a6
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
0 commit comments