{"record":{"id":"6691db7ff2261fe2","repo":"github/spec-kit","slug":"catalog-config-file-config-path-is-corrupted-ex","errorCode":null,"errorMessage":"Catalog config file {config_path} is corrupted (expected a mapping).","messagePattern":"Catalog config file (.+?) is corrupted \\(expected a mapping\\)\\.","errorType":"validation","errorClass":"IntegrationValidationError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/integrations/catalog.py","lineNumber":419,"sourceCode":"        \"\"\"\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\n        # Validate each existing entry before mutating anything. Fail fast so\n        # we don't silently preserve a corrupt sibling entry or derive a new\n        # priority from a bogus value.\n        existing_priorities: List[int] = []\n        valid_catalog_count = 0\n        for idx, cat in enumerate(catalogs):","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/integrations/catalog.py#L401-L437","documentation":"Error \"Catalog config file {config_path} is corrupted (expected a mapping).\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/integrations/catalog.py:419 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the catalog config file so its top level is a mapping, or delete it to regenerate."],"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-15T17:31:12.345Z"}