(response: Response, fallback: string)
| 35 | } |
| 36 | |
| 37 | export async function readErrorResponse(response: Response, fallback: string) { |
| 38 | try { |
| 39 | return await response.json() |
| 40 | } catch { |
| 41 | return new Error(fallback) |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | export async function readSseResponse( |
| 46 | response: Response, |
no test coverage detected