{"record":{"id":"2b0eab8ad0ca1ea3","repo":"OpenBB-finance/OpenBB","slug":"intrinio-error-message-init-response-error","errorCode":null,"errorMessage":"Intrinio Error Message -> {init_response['error']}: {init_response.get('message')}","messagePattern":"Intrinio Error Message -> (.+?): (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py","lineNumber":237,"sourceCode":"        \"\"\"Return the raw data from the Intrinio endpoint.\"\"\"\n        api_key = credentials.get(\"intrinio_api_key\") if credentials else \"\"\n        base_url = f\"https://api-v2.intrinio.com/securities/{query.symbol}/prices\"\n        query_str = get_querystring(\n            query.model_dump(by_alias=True), [\"symbol\", \"interval\"]\n        )\n\n        if query._interval_size:\n            base_url += f\"/intervals?interval_size={query._interval_size}\"\n            data_key = \"intervals\"\n        elif query._frequency:\n            base_url += f\"?frequency={query._frequency}\"\n            data_key = \"stock_prices\"\n\n        async def callback(response: ClientResponse, session: ClientSession) -> list:\n            \"\"\"Return the response.\"\"\"\n            init_response = await response.json()\n            if \"error\" in init_response:\n                raise OpenBBError(\n                    f\"Intrinio Error Message -> {init_response['error']}: {init_response.get('message')}\"  # type: ignore\n                )\n\n            all_data: list = init_response.get(data_key, [])  # type: ignore\n\n            next_page = init_response.get(\"next_page\", None)  # type: ignore\n            while next_page:\n                url = response.url.update_query(next_page=next_page).human_repr()\n                response_data = await session.get_json(url)\n\n                all_data.extend(response_data.get(data_key, []))  # type: ignore\n                next_page = response_data.get(\"next_page\", None)  # type: ignore\n\n            return all_data\n\n        url = f\"{base_url}&{query_str}&api_key={api_key}\"\n\n        return await amake_request(url, response_callback=callback, **kwargs)  # type: ignore","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py#L219-L255","documentation":"Raised in the pagination callback of IntrinioEquityHistoricalFetcher when the first page of the /securities/{symbol}/prices (or /intervals) response contains an 'error' key. The message embeds both the Intrinio error code and its message so the caller sees the upstream reason verbatim.","triggerScenarios":"Historical price requests with an invalid/delisted symbol, unsupported parameter combos (e.g. an interval/frequency the security doesn't support), bad date parameters, or auth/subscription problems phrased without the 'api key' wording. Also fires when query._interval_size or _frequency resolution produces a URL the API rejects.","commonSituations":"Requesting intraday (1m/5m/...) bars where Intrinio requires the intervals API and specific plans; symbols with dashes/Share classes formatted incorrectly; start_date/end_date outside allowed ranges; paid-plan feature limits.","solutions":["Read the embedded error code/message — it is Intrinio's own text and names the exact problem","Validate the symbol first (obb.equity.search / obb.equity.profile) and use Intrinio's expected ticker format","For intraday intervals, confirm your plan supports real-time/intervals data and use supported interval values","Check the date range parameters; some endpoints limit how far back you can query"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"SUPPORTED_INTERVALS = {\"1m\", \"5m\", \"10m\", \"15m\", \"30m\", \"60m\", \"1h\", \"1d\", \"1W\", \"1M\"}\n\ndef historical_params_ok(symbol: str, interval: str) -> bool:\n    return bool(symbol) and symbol.replace(\"-\", \"\").replace(\".\", \"\").isalnum() and interval in SUPPORTED_INTERVALS","typeGuard":"from openbb_core.provider.abstract.error import OpenBBError\n\ndef is_intrinio_api_error(err: BaseException) -> bool:\n    return isinstance(err, OpenBBError) and str(err).startswith(\"Intrinio Error Message\")","tryCatchPattern":"from openbb_core.provider.abstract.error import OpenBBError\n\ntry:\n    bars = await obb.equity.price.historical(provider=\"intrinio\", symbol=sym, interval=\"1d\")\nexcept OpenBBError as e:\n    if str(e).startswith(\"Intrinio Error Message\"):\n        log.warning(\"intrinio historical rejected %s: %s\", sym, e)\n        bars = None\n    else:\n        raise","preventionTips":["Use Intrinio-format tickers and supported interval values","Confirm plan support for intraday/intervals data before requesting it","Parse the embedded error code to distinguish bad-symbol vs bad-params vs access"],"tags":["api-error","equity-historical","intrinio","prices","upstream-error"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}