(response: Response)
| 28 | * empty 200 responses from lifecycle endpoints). |
| 29 | */ |
| 30 | export async function parseDaytonaJson(response: Response): Promise<Record<string, any>> { |
| 31 | const text = await response.text() |
| 32 | if (!text) return {} |
| 33 | try { |
| 34 | return JSON.parse(text) |
| 35 | } catch { |
| 36 | return {} |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Extracts a human-readable error message from a Daytona API error response. |
no test coverage detected