* Handles stream errors * @param error - Error from the stream
(error: unknown)
| 408 | * @param error - Error from the stream |
| 409 | */ |
| 410 | private handleStreamError(error: unknown): never { |
| 411 | if (error instanceof KoduError) { |
| 412 | console.error("KODU API request failed", error) |
| 413 | throw error |
| 414 | } |
| 415 | |
| 416 | if (axios.isAxiosError(error)) { |
| 417 | throw new KoduError({ |
| 418 | code: error.response?.status || 500, |
| 419 | }) |
| 420 | } |
| 421 | |
| 422 | throw error |
| 423 | } |
| 424 | |
| 425 | private getTaskText(str: string) { |
| 426 | const [taskStartTag, taskEndTag] = ["<task>", "</task>"] |
no outgoing calls
no test coverage detected