{"record":{"id":"813d00d309b547ff","repo":"firecrawl/firecrawl","slug":"highlights-format-must-be-an-object-with-type-an","errorCode":null,"errorMessage":"highlights format must be an object with 'type' and 'query' fields","messagePattern":"highlights format must be an object with 'type' and 'query' fields","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"apps/python-sdk/firecrawl/v2/utils/validation.py","lineNumber":481,"sourceCode":"\n    return format_obj\n\n\ndef _validate_question_format(format_obj: Any) -> Dict[str, Any]:\n    \"\"\"Validate and prepare question format object.\"\"\"\n    if not isinstance(format_obj, dict):\n        raise ValueError(\"question format must be an object with 'type' and 'question' fields\")\n\n    if not isinstance(format_obj.get('question'), str) or not format_obj['question'].strip():\n        raise ValueError(\"question format requires a non-empty 'question' string\")\n\n    return format_obj\n\n\ndef _validate_highlights_format(format_obj: Any) -> Dict[str, Any]:\n    \"\"\"Validate and prepare highlights format object.\"\"\"\n    if not isinstance(format_obj, dict):\n        raise ValueError(\"highlights format must be an object with 'type' and 'query' fields\")\n\n    if not isinstance(format_obj.get('query'), str) or not format_obj['query'].strip():\n        raise ValueError(\"highlights format requires a non-empty 'query' string\")\n\n    return format_obj\n\n\ndef validate_scrape_options(options: Optional[ScrapeOptions]) -> Optional[ScrapeOptions]:\n    \"\"\"\n    Validate and normalize scrape options.\n    \n    Args:\n        options: Scraping options to validate\n        \n    Returns:\n        Validated options or None\n        \n    Raises:","sourceCodeStart":463,"sourceCodeEnd":499,"githubUrl":"https://github.com/firecrawl/firecrawl/blob/656bffcc2883f1af5befe38766b1ff5f0469993a/apps/python-sdk/firecrawl/v2/utils/validation.py#L463-L499","documentation":"Error \"highlights format must be an object with 'type' and 'query' fields\" thrown in firecrawl/firecrawl.","triggerScenarios":"Thrown at apps/python-sdk/firecrawl/v2/utils/validation.py:481 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"}