{"record":{"id":"d5bb6822ef4b625f","repo":"ZhuLinsen/daily_stock_analysis","slug":"unsupported-market-market","errorCode":null,"errorMessage":"unsupported market: {market}","messagePattern":"unsupported market: (.+?)","errorType":"validation","errorClass":"IntelligenceServiceError","httpStatus":400,"severity":"error","filePath":"src/services/intelligence_service.py","lineNumber":380,"sourceCode":"        url = str(payload.get(\"url\") or \"\").strip()\n        source_type = str(payload.get(\"source_type\") or \"rss\").strip().lower()\n        scope_type = str(payload.get(\"scope_type\") or \"market\").strip().lower()\n        scope_value = str(payload.get(\"scope_value\") or \"\").strip() or None\n        market = str(payload.get(\"market\") or \"cn\").strip().lower()\n        enabled = bool(payload.get(\"enabled\", True))\n        description = str(payload.get(\"description\") or \"\").strip() or None\n        if not name:\n            raise IntelligenceServiceError(\"source name is required\")\n        if not url:\n            raise IntelligenceServiceError(\"source url is required\")\n        if source_type not in _ALLOWED_SOURCE_TYPES:\n            raise IntelligenceServiceError(f\"unsupported source_type: {source_type}\")\n        if scope_type not in _ALLOWED_SCOPE_TYPES:\n            raise IntelligenceServiceError(f\"unsupported scope_type: {scope_type}\")\n        if scope_type in {\"symbol\", \"sector\"} and not scope_value:\n            raise IntelligenceServiceError(f\"scope_value is required when scope_type={scope_type}\")\n        if market not in _ALLOWED_MARKETS:\n            raise IntelligenceServiceError(f\"unsupported market: {market}\")\n        return {\n            \"name\": name[:100],\n            \"source_type\": source_type,\n            \"url\": url,\n            \"enabled\": enabled,\n            \"scope_type\": scope_type,\n            \"scope_value\": scope_value[:64] if scope_value else None,\n            \"market\": market,\n            \"description\": description,\n        }\n\n    def _validate_url(self, raw_url: str, *, allow_no_url: bool = False) -> None:\n        if allow_no_url and raw_url.startswith(\"no-url:intel:\"):\n            return\n        parsed = urlparse(raw_url)\n        if parsed.scheme.lower() not in {\"http\", \"https\"} or not parsed.netloc:\n            raise IntelligenceServiceError(\"source url must be an absolute http(s) URL\")\n        if parsed.username or parsed.password:","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/ZhuLinsen/daily_stock_analysis/blob/5159bd72e8373d215492dff122acc9d389e219c9/src/services/intelligence_service.py#L362-L398","documentation":"Error \"unsupported market: {market}\" thrown in ZhuLinsen/daily_stock_analysis.","triggerScenarios":"Thrown at src/services/intelligence_service.py:380 when the library encounters an invalid state.","commonSituations":"Raised when an intelligence source is scoped to an unsupported market; occurs when the market value is not one of the supported cn/hk/us/etc. codes.","solutions":["Use a supported market value such as cn, hk, or us.","Fix the client/request to send one of the documented market codes.","Check for typos or unsupported region codes in the request."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5159bd72e8373d215492dff122acc9d389e219c9","analyzedAt":"2026-08-15T01:59:36.292Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}