{"record":{"id":"5b38646bbc8d8494","repo":"github/spec-kit","slug":"catalog-source-id-r-url-is-malformed-url-r","errorCode":null,"errorMessage":"Catalog {source.id!r} URL is malformed: {url!r}","messagePattern":"Catalog (.+?) URL is malformed: (.+?)","errorType":"exception","errorClass":"BundlerError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/bundler/services/adapters.py","lineNumber":129,"sourceCode":"    return loads_json(path.read_text(encoding=\"utf-8\"), origin=str(path))\n\n\ndef make_catalog_fetcher(*, allow_network: bool = True):\n    \"\"\"Return a fetcher callable suitable for :class:`CatalogStack`.\n\n    When *allow_network* is False, ``http(s)://`` sources raise instead of\n    touching the network (used by offline tests and ``--offline`` flows).\n    \"\"\"\n\n    def fetch(source: CatalogSource) -> dict:\n        url = source.url\n        try:\n            parsed = urlparse(url)\n            # Keep malformed authorities and ports inside the BundlerError\n            # contract even when a config file was edited by hand.\n            _ = parsed.port\n        except ValueError:\n            raise BundlerError(\n                f\"Catalog {source.id!r} URL is malformed: {url!r}\"\n            ) from None\n        scheme = parsed.scheme.lower()\n\n        if scheme == \"builtin\":\n            if url == \"builtin://community\":\n                if allow_network:\n                    return _http_get_json(source.id, COMMUNITY_CATALOG_URL)\n                return _load_packaged_community_catalog()\n            payload = _BUILTIN_CATALOGS.get(url)\n            if payload is None:\n                raise BundlerError(f\"Unknown built-in catalog '{url}'.\")\n            return payload\n\n        if scheme == \"file\":\n            path = _file_url_to_path(parsed)\n            if not path.exists():\n                raise BundlerError(f\"Catalog file not found: {path}\")","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/bundler/services/adapters.py#L111-L147","documentation":"Error \"Catalog {source.id!r} URL is malformed: {url!r}\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/bundler/services/adapters.py:129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the catalog source URL in the catalog config so it is a well-formed URL."],"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"}