{"record":{"id":"8eda71635a2a518e","repo":"github/spec-kit","slug":"malformed-catalog-config-at-path-catalogs-mus","errorCode":null,"errorMessage":"Malformed catalog config at {path}: 'catalogs' must be a list, got {type(catalogs).__name__}.","messagePattern":"Malformed catalog config at (.+?): 'catalogs' must be a list, got (.+?)\\.","errorType":"exception","errorClass":"BundlerError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/bundler/commands_impl/catalog_config.py","lineNumber":68,"sourceCode":"            f\"Malformed catalog config at {path}: expected a mapping at the top \"\n            f\"level, got {type(data).__name__}.\"\n        )\n    schema_version = data.get(\"schema_version\")\n    if schema_version is not None and (\n        str(schema_version).strip().split(\".\")[0]\n        != CONFIG_SCHEMA_VERSION.split(\".\")[0]\n    ):\n        raise BundlerError(\n            f\"Unsupported catalog config schema version \"\n            f\"'{str(schema_version).strip()}' at {path}; this Spec Kit \"\n            f\"understands version {CONFIG_SCHEMA_VERSION}. The file may have been \"\n            \"written by a newer version or is corrupt.\"\n        )\n    catalogs = data.get(\"catalogs\")\n    if catalogs is None:\n        return []\n    if not isinstance(catalogs, list):\n        raise BundlerError(\n            f\"Malformed catalog config at {path}: 'catalogs' must be a list, \"\n            f\"got {type(catalogs).__name__}.\"\n        )\n    for entry in catalogs:\n        if not isinstance(entry, dict):\n            raise BundlerError(\n                f\"Malformed catalog config at {path}: each catalog entry must be \"\n                f\"a mapping, got {type(entry).__name__}.\"\n            )\n    return list(catalogs)\n\n\ndef _write(project_root: Path, catalogs: list[dict]) -> None:\n    payload = {\"schema_version\": CONFIG_SCHEMA_VERSION, \"catalogs\": catalogs}\n    dump_yaml(_config_path(project_root), payload, within=project_root)\n\n\ndef _slug(value: str) -> str:","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/bundler/commands_impl/catalog_config.py#L50-L86","documentation":"Raised when the `catalogs` key in `bundle-catalogs.yml` is present but not a YAML list. Per the schema (`bundle-catalog.schema.md`) `catalogs` must be an array of source mappings; a mapping or scalar is malformed. `catalogs: null` (or the key absent) is fine and returns an empty list.","triggerScenarios":"`catalogs:` followed by an indented mapping (`catalogs:\n  id: ...`) instead of list items, or `catalogs: \"none\"` / any non-list scalar.","commonSituations":"YAML indentation mistake: writing `id:`/`url:` at the same level under `catalogs:` instead of `- id:` list items; merging configs by hand.","solutions":["Make each source a list item under `catalogs:` (prefix with `- `)","Validate the YAML with a linter before saving","Use the CLI add/remove commands instead of manual edits"],"exampleFix":"# before\ncatalogs:\n  id: community\n  url: https://example.com/c.json\n\n# after\ncatalogs:\n  - id: community\n    url: https://example.com/c.json","handlingStrategy":"validation","validationCode":"catalogs = data.get(\"catalogs\")\nif catalogs is not None and not isinstance(catalogs, list):\n    raise SystemExit(\"'catalogs' must be a list of mappings — each entry starts with '- '\")","typeGuard":"def catalogs_is_list(data: dict) -> bool:\n    c = data.get(\"catalogs\")\n    return c is None or isinstance(c, list)","tryCatchPattern":"try:\n    read_catalog_config(project_root)\nexcept BundlerError as exc:\n    if \"'catalogs' must be a list\" in str(exc):\n        # convert the mapping under catalogs: into list items with '- '\n        raise\n    raise","preventionTips":["Use a YAML linter (yamllint truthy/key-duplicates rules) on .specify/ files","Remember each entry under catalogs: is a list item prefixed with '- '"],"tags":["bundler","catalog","yaml","validation"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}