()
| 94 | let response = null; |
| 95 | |
| 96 | const abort = () => { |
| 97 | const error = new AbortError("The operation was aborted."); |
| 98 | reject(error); |
| 99 | if (request.body && request.body instanceof Stream.Readable) { |
| 100 | request.body.destroy(error); |
| 101 | } |
| 102 | |
| 103 | if (!response || !response.body) { |
| 104 | return; |
| 105 | } |
| 106 | |
| 107 | response.body.emit("error", error); |
| 108 | }; |
| 109 | |
| 110 | if (signal && signal.aborted) { |
| 111 | abort(); |
no test coverage detected