{"record":{"id":"0d567dbe895167a7","repo":"crewAIInc/crewAI","slug":"error-fetching-triggers-e","errorCode":null,"errorMessage":"Error fetching triggers: {e}","messagePattern":"Error fetching triggers: (.+?)","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"lib/cli/src/crewai_cli/triggers/main.py","lineNumber":35,"sourceCode":"    \"\"\"\n\n    def __init__(self) -> None:\n        BaseCommand.__init__(self)\n        PlusAPIMixin.__init__(self, telemetry=self._telemetry)\n\n    def list_triggers(self) -> None:\n        \"\"\"List all available triggers from integrations.\"\"\"\n        try:\n            console.print(\"[bold blue]Fetching available triggers...[/bold blue]\")\n            response = self.plus_api_client.get_triggers()\n            self._validate_response(response)\n\n            triggers_data = response.json()\n            self._display_triggers(triggers_data)\n\n        except Exception as e:\n            console.print(f\"[bold red]Error fetching triggers: {e}[/bold red]\")\n            raise SystemExit(1) from e\n\n    def execute_with_trigger(self, trigger_path: str) -> None:\n        \"\"\"Execute crew with trigger payload.\"\"\"\n        try:\n            if \"/\" not in trigger_path:\n                console.print(\n                    \"[bold red]Error: Trigger must be in format 'app_slug/trigger_slug'[/bold red]\"\n                )\n                raise SystemExit(1)\n\n            app_slug, trigger_slug = trigger_path.split(\"/\", 1)\n\n            console.print(\n                f\"[bold blue]Fetching trigger payload for {app_slug}/{trigger_slug}...[/bold blue]\"\n            )\n            response = self.plus_api_client.get_trigger_payload(app_slug, trigger_slug)\n\n            if response.status_code == 404:","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/cli/src/crewai_cli/triggers/main.py#L17-L53","documentation":"Printed with SystemExit(1) by TriggerCommand.list_triggers() in crewai_cli/triggers/main.py when any exception occurs while fetching triggers from CrewAI Plus (self.plus_api_client.get_triggers()), including response validation failures from _validate_response (auth errors, non-200 status).","triggerScenarios":"Running `crewai trigger list` without being authenticated to CrewAI Plus (missing/expired API key), with a 401/403 from the Plus API, a network failure, or a malformed JSON response failing _validate_response.","commonSituations":"Not logged in via `crewai login`; CREWAI_API_KEY expired or from a different workspace with no trigger integrations; corporate proxy blocking api.crewai.com; Plus API outage.","solutions":["Authenticate first: `crewai login` (or set the API key) and retry `crewai trigger list`.","Check network/proxy access to the CrewAI Plus API from your environment.","Run with any verbose/debug flag or re-run `crewai login` if the token expired.","If _validate_response failed with a status message, address that status (e.g. workspace has no integrations installed — add one in the Plus dashboard)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"from crewai_cli.authentication.platform import PlatformAuthentication\nauth = PlatformAuthentication()\nif not auth.get_api_key():\n    raise SystemExit(\"Not authenticated — run `crewai login` first\")","typeGuard":null,"tryCatchPattern":"import time\nfor attempt in range(3):\n    try:\n        response = plus_api_client.get_triggers()\n        break\n    except Exception:\n        if attempt == 2:\n            raise\n        time.sleep(2 ** attempt)","preventionTips":["Run `crewai login` before any `crewai trigger` command","Keep the API key current in CI secrets and rotate before expiry","Distinguish transient network failures (retry) from 401/403 (re-auth)"],"tags":["crewai","cli","triggers","network","auth"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}