{"record":{"id":"aa18093bd828dd54","repo":"OpenBB-finance/OpenBB","slug":"required-field-missing-symbol-aa1809","errorCode":null,"errorMessage":"Required field missing -> symbol","messagePattern":"Required field missing -> symbol","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py","lineNumber":95,"sourceCode":"        ge=0,\n        le=1,\n        description=\"News stories will have a business relevance score more than this value.\"\n        + \" Unsupported for yahoo source. Value is a decimal between 0 and 1.\",\n    )\n    business_relevance_less_than: float | None = Field(\n        default=None,\n        ge=0,\n        le=1,\n        description=\"News stories will have a business relevance score less than this value.\"\n        + \" Unsupported for yahoo source. Value is a decimal between 0 and 1.\",\n    )\n\n    @field_validator(\"symbol\", mode=\"before\", check_fields=False)\n    @classmethod\n    def _symbol_mandatory(cls, v):\n        \"\"\"Symbol mandatory validator.\"\"\"\n        if not v:\n            raise OpenBBError(\"Required field missing -> symbol\")\n        return v\n\n\nclass IntrinioCompanyNewsData(CompanyNewsData):\n    \"\"\"Intrinio Company News Data.\"\"\"\n\n    __alias_dict__ = {\n        \"date\": \"publication_date\",\n        \"sentiment\": \"article_sentiment\",\n        \"sentiment_confidence\": \"article_sentiment_confidence\",\n        \"symbols\": \"symbol\",\n    }\n    source: str | None = Field(\n        default=None,\n        description=\"The source of the news article.\",\n    )\n    summary: str | None = Field(\n        default=None,","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py#L77-L113","documentation":"Raised by a pydantic field_validator (mode='before') on the QueryParams model for Intrinio company news. The Intrinio company news endpoint is per-symbol, so the provider declares symbol mandatory even though the shared QueryParams class types it as optional (default=None). The validator runs at request-parameter validation time and raises OpenBBError before any HTTP call is made when symbol is falsy.","triggerScenarios":"Calling news.company_news(provider='intrinio') with no symbol argument, with symbol='' or symbol=None. Because the router-level QueryParams allow omitting symbol (the standard model supports all-news queries), the error surfaces only after the router hands off to the Intrinio provider fetcher.","commonSituations":"Porting code from a provider where symbol is optional (e.g. benzinga world news) to intrinio; building generic news UIs that fetch headlines without a ticker; passing an empty string from a search box that the app did not validate.","solutions":["Pass a non-empty symbol: news.company_news(provider='intrinio', symbol='AAPL')","For comma-separated lists, ensure the string is not empty before splitting: symbol='AAPL,MSFT'","If you want market-wide news without a symbol, use a provider/router that supports it, e.g. news.world(provider=...) instead of intrinio company news"],"exampleFix":"# before\nobb.news.company_news(provider=\"intrinio\")\n\n# after\nobb.news.company_news(provider=\"intrinio\", symbol=\"AAPL\")","handlingStrategy":"validation","validationCode":"def validate_intrinio_news_params(symbol: str | None) -> str:\n    \"\"\"Raise before the router call when symbol is unusable for Intrinio news.\"\"\"\n    if not symbol or not symbol.strip():\n        raise ValueError(\"provider 'intrinio' requires a non-empty symbol for company news\")\n    return symbol.strip()","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.abstract.error import OpenBBError\n\ntry:\n    res = obb.news.company_news(provider=\"intrinio\", symbol=symbol)\nexcept OpenBBError as e:\n    if \"Required field missing -> symbol\" in str(e):\n        raise ValueError(\"intrinio company news needs a symbol\") from e\n    raise","preventionTips":["Validate symbol is non-empty before every intrinio company-news call","Default the UI/CLI to require a ticker when provider is intrinio","Use news.world-style endpoints for symbol-less headlines"],"tags":["validation","query-params","pydantic","news","intrinio"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}