* Classify a failed Copilot attempt into a short, named failure class. * @param {{ * hasOutput: boolean, * isAuthErr?: boolean, * isAuthenticationFailed?: boolean, * isTransientCAPIError?: boolean, * isMCPGatewayShutdown?: boolean, * isMCPPolicy?: boolean, * isModelNotSupported
(detection)
| 352 | * @returns {string} |
| 353 | */ |
| 354 | function classifyCopilotFailure(detection) { |
| 355 | if (detection.isQuotaExceeded) return "capi_quota_exceeded"; |
| 356 | if (detection.isMCPPolicy) return "mcp_policy_blocked"; |
| 357 | if (detection.isModelNotSupported) return "model_not_supported"; |
| 358 | if (detection.isHTTP400ResponseError) return "http_400_response_error"; |
| 359 | if (detection.isNullTypeToolCall) return "null_type_tool_call"; |
| 360 | if (detection.isAuthErr) return "no_auth_info"; |
| 361 | if (detection.isAuthenticationFailed) return "authentication_failed"; |
| 362 | if (detection.isSDKSessionIdleTimeout) return "sdk_session_idle_timeout"; |
| 363 | if (detection.isMCPGatewayShutdown) return "mcp_gateway_shutdown"; |
| 364 | if (detection.hasNumerousPermissionDenied) return "permission_denied"; |
| 365 | if (detection.isTransientCAPIError) return "capi_error_400"; |
| 366 | return detection.hasOutput ? "partial_execution" : "no_output"; |
| 367 | } |
| 368 | |
| 369 | /** |
| 370 | * Extract provider auth failure details from Copilot output when available. |
no outgoing calls
no test coverage detected