(response: Response)
| 106 | * Safely handles non-JSON bodies and read failures. Used by internal API routes. |
| 107 | */ |
| 108 | export async function extractGraphError(response: Response): Promise<string> { |
| 109 | const errorText = await response.text().catch(() => '') |
| 110 | return parseGraphErrorMessage(response.status, response.statusText, errorText) |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Escape a string for use inside an OData single-quoted literal (e.g. a |
no test coverage detected