{"record":{"id":"f98794709c6e43c8","repo":"crewAIInc/crewAI","slug":"failed-to-parse-response-from-enterprise-api-faile","errorCode":null,"errorMessage":"Failed to parse response from Enterprise API failed. Details:","messagePattern":"Failed to parse response from Enterprise API failed\\. Details:","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"lib/cli/src/crewai_cli/command.py","lineNumber":57,"sourceCode":"\n    def _validate_response(self, response: httpx.Response) -> None:\n        \"\"\"Handle and display error messages from API responses.\n\n        Args:\n            response: The response from the Plus API.\n        \"\"\"\n        try:\n            json_response = response.json()\n        except (json.JSONDecodeError, ValueError):\n            console.print(\n                \"Failed to parse response from Enterprise API failed. Details:\",\n                style=\"bold red\",\n            )\n            console.print(f\"Status Code: {response.status_code}\")\n            console.print(\n                f\"Response:\\n{response.content.decode('utf-8', errors='replace')}\"\n            )\n            raise SystemExit from None\n\n        if response.status_code == 422:\n            console.print(\n                \"Failed to complete operation. Please fix the following errors:\",\n                style=\"bold red\",\n            )\n            for field, messages in json_response.items():\n                for message in messages:\n                    console.print(\n                        f\"* [bold red]{field.capitalize()}[/bold red] {message}\"\n                    )\n            raise SystemExit\n\n        if not response.is_success:\n            console.print(\n                \"Request to Enterprise API failed. Details:\", style=\"bold red\"\n            )\n            details = (","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/cli/src/crewai_cli/command.py#L39-L75","documentation":"Error \"Failed to parse response from Enterprise API failed. Details:\" thrown in crewAIInc/crewAI.","triggerScenarios":"Thrown at lib/cli/src/crewai_cli/command.py:57 when the library encounters an invalid state.","commonSituations":"Occurs when the Enterprise API returns a response that cannot be parsed as expected JSON. Check connectivity to the Enterprise API and that the endpoint and credentials are correct.","solutions":["Check that the Enterprise API endpoint is correct and reachable.","Verify your authentication token is valid and retry.","Inspect the raw response details shown in the error for the underlying cause."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}