{"record":{"id":"d58507519c70aa65","repo":"github/spec-kit","slug":"failed-to-read-catalog-config-config-path-exc","errorCode":null,"errorMessage":"Failed to read catalog config {config_path}: {exc}","messagePattern":"Failed to read catalog config (.+?): (.+?)","errorType":"validation","errorClass":"IntegrationValidationError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/integrations/catalog.py","lineNumber":413,"sourceCode":"\n        The URL is normalized (whitespace stripped) and validated before being\n        written. Duplicate URLs are rejected, including near-duplicates that\n        differ only by surrounding whitespace. Priority is derived as\n        ``max(existing) + 1`` so the new entry sorts last in the resolution\n        order unless the user edits the file manually.\n        \"\"\"\n        url = url.strip()\n        if not url:\n            raise IntegrationValidationError(\"Catalog URL must be non-empty.\")\n        self._validate_catalog_url(url)\n        config_path = self.project_root / \".specify\" / self.CONFIG_FILENAME\n\n        data: Dict[str, Any] = {\"catalogs\": []}\n        if config_path.exists():\n            try:\n                raw = yaml.safe_load(config_path.read_text(encoding=\"utf-8\"))\n            except (yaml.YAMLError, OSError, UnicodeError) as exc:\n                raise IntegrationValidationError(\n                    f\"Failed to read catalog config {config_path}: {exc}\"\n                ) from exc\n            if raw is None:\n                raw = {}\n            if not isinstance(raw, dict):\n                raise IntegrationValidationError(\n                    f\"Catalog config file {config_path} is corrupted \"\n                    \"(expected a mapping).\"\n                )\n            data = raw\n\n        catalogs = data.get(\"catalogs\", [])\n        if not isinstance(catalogs, list):\n            raise IntegrationValidationError(\n                f\"Catalog config {config_path} has invalid 'catalogs' value: \"\n                \"must be a list.\"\n            )\n","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/integrations/catalog.py#L395-L431","documentation":"Error \"Failed to read catalog config {config_path}: {exc}\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/integrations/catalog.py:413 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix permissions or corruption on the catalog config file, or delete it so a fresh config is created."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}