(requestConfig = {}, account)
| 99 | }; |
| 100 | try { |
| 101 | const response = await axios.getAdapter('fetch', adaptedConfig)(adaptedConfig); |
| 102 | // Existing SSE consumers rely on Node streams for both success and error bodies. |
| 103 | if (requestConfig.responseType === 'stream') response.data = Readable.fromWeb(response.data); |
| 104 | return response; |
| 105 | } catch (error) { |
| 106 | if (requestConfig.responseType === 'stream' && error.response?.data?.getReader) { |
| 107 | error.response.data = Readable.fromWeb(error.response.data); |
| 108 | } |
| 109 | throw error; |
| 110 | } |
| 111 | }; |
nothing calls this directly
no test coverage detected