{"record":{"id":"b92e62b4a993d02e","repo":"firecrawl/firecrawl","slug":"invalid-source-type-source-type-valid-types","errorCode":null,"errorMessage":"Invalid source type: {source.type}. Valid types: {valid_sources}","messagePattern":"Invalid source type: (.+?)\\. Valid types: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"apps/python-sdk/firecrawl/v2/methods/aio/search.py","lineNumber":121,"sourceCode":"            raise ValueError(\"Limit must be positive\")\n        if request.limit > 100:\n            raise ValueError(\"Limit cannot exceed 100\")\n\n    if request.timeout is not None:\n        if request.timeout <= 0:\n            raise ValueError(\"Timeout must be positive\")\n        if request.timeout > 300000:\n            raise ValueError(\"Timeout cannot exceed 300000ms (5 minutes)\")\n\n    if request.sources is not None:\n        valid_sources = {\"web\", \"news\", \"images\"}\n        for source in request.sources:\n            if isinstance(source, str):\n                if source not in valid_sources:\n                    raise ValueError(f\"Invalid source type: {source}. Valid types: {valid_sources}\")\n            elif hasattr(source, 'type'):\n                if source.type not in valid_sources:\n                    raise ValueError(f\"Invalid source type: {source.type}. Valid types: {valid_sources}\")\n\n    if request.include_domains and request.exclude_domains:\n        raise ValueError(\n            \"include_domains and exclude_domains cannot both be specified\"\n        )\n\n    if request.location is not None:\n        if not isinstance(request.location, str) or len(request.location.strip()) == 0:\n            raise ValueError(\"Location must be a non-empty string\")\n\n    if request.tbs is not None:\n        if not isinstance(request.tbs, str) or len(request.tbs.strip()) == 0:\n            raise ValueError(\"tbs must be a non-empty string\")\n\n    if request.scrape_options is not None:\n        validate_scrape_options(request.scrape_options)\n\n    return request","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/firecrawl/firecrawl/blob/656bffcc2883f1af5befe38766b1ff5f0469993a/apps/python-sdk/firecrawl/v2/methods/aio/search.py#L103-L139","documentation":"Error \"Invalid source type: {source.type}. Valid types: {valid_sources}\" thrown in firecrawl/firecrawl.","triggerScenarios":"Thrown at apps/python-sdk/firecrawl/v2/methods/aio/search.py:121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"656bffcc2883f1af5befe38766b1ff5f0469993a","analyzedAt":"2026-08-12T01:18:00.488Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}