(error: ProviderError.ResponseStreamError)
| 200 | } |
| 201 | |
| 202 | function failedResponse(error: ProviderError.ResponseStreamError) { |
| 203 | return new Response( |
| 204 | new ReadableStream({ |
| 205 | start(controller) { |
| 206 | controller.error(error) |
| 207 | }, |
| 208 | }), |
| 209 | { |
| 210 | status: 200, |
| 211 | headers: { "content-type": "text/event-stream" }, |
| 212 | }, |
| 213 | ) |
| 214 | } |
| 215 | |
| 216 | async function socket( |
| 217 | entry: PoolEntry, |