{"record":{"id":"3a688c577872d1b5","repo":"OpenBB-finance/OpenBB","slug":"error-fetching-data-from-intrinio-response-statu","errorCode":null,"errorMessage":"Error fetching data from Intrinio: {response.status} -> {response.text}","messagePattern":"Error fetching data from Intrinio: (.+?) -> (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/company_filings.py","lineNumber":131,"sourceCode":"        from openbb_core.provider.utils.helpers import (\n            get_async_requests_session,\n            get_querystring,\n        )\n\n        api_key = credentials.get(\"intrinio_api_key\") if credentials else \"\"\n\n        base_url = \"https://api-v2.intrinio.com/companies\"\n        query_str = get_querystring(\n            query.model_dump(by_alias=True), [\"symbol\", \"limit\", \"page_size\"]\n        )\n        url = f\"{base_url}/{query.symbol}/filings?{query_str}&page_size={query.limit or 10000}&api_key={api_key}\"\n        results: list = []\n        metadata: dict = {}\n        session = await get_async_requests_session()\n\n        async with await session.get(url) as response:\n            if response.status != 200:\n                raise OpenBBError(\n                    f\"Error fetching data from Intrinio: {response.status} -> {response.text}\"\n                )\n            result = await response.json()\n            if filings := result.get(\"filings\", []):\n                results.extend(filings)\n\n            metadata = result.get(\"company\", {})\n\n            while next_page := result.get(\"next_page\"):\n                url += f\"&next_page={next_page}\"\n                async with await session.get(url) as next_response:\n                    if response.status != 200:\n                        raise OpenBBError(\n                            f\"Error fetching data from Intrinio: {response.status} -> {response.text}\"\n                        )\n                    result = await next_response.json()\n                    if filings := result.get(\"filings\", []):\n                        results.extend(filings)","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/company_filings.py#L113-L149","documentation":"The first-page HTTP guard in the Intrinio filings fetcher: after GET {base}/companies/{symbol}/filings, any non-200 status raises OpenBBError embedding the status code and response body. Typical statuses are 401/403 (bad or under-privileged API key), 404 (unknown symbol), 429 (rate limit).","triggerScenarios":"Calling obb.equity.filings(provider='intrinio', symbol=...) with a missing/expired Intrinio API key (401/403), a delisted or mistyped symbol (404), or exceeding Intrinio's per-minute call limits (429). The response body text is appended verbatim, so the exact cause is in the message.","commonSituations":"Env var INTRINIO_API_KEY not set in the session; free-tier keys hitting paid endpoints; rate limits during batch backfills; symbols from other markets (e.g. OTC tickers) Intrinio doesn't cover.","solutions":["Check the status in the message: 401/403 -> fix credentials (obb.user.credentials.intrinio_api_key); 404 -> verify the symbol exists on Intrinio; 429 -> slow down / add backoff.","Confirm the key is loaded: python -c \"from openbb import obb; print(bool(obb.user.credentials.intrinio_api_key))\".","For batch jobs, add exponential backoff on 429 and cache responses.","Retry once after fixing credentials - the error includes response.text for diagnosis."],"exampleFix":"# before\nobb.user.credentials.intrinio_api_key = 'WRONG_KEY'\nobb.equity.filings(provider='intrinio', symbol='AAPL')\n# after\nobb.user.credentials.intrinio_api_key = os.environ['INTRINIO_API_KEY']  # valid key\nobb.equity.filings(provider='intrinio', symbol='AAPL')\n\n# batch backoff for 429\nimport time\nfor attempt in range(5):\n    try:\n        res = obb.equity.filings(provider='intrinio', symbol=sym); break\n    except Exception as e:\n        if '429' in str(e): time.sleep(2 ** attempt); continue\n        raise","handlingStrategy":"retry","validationCode":"from openbb import obb\nimport os\n# Ensure credentials exist before the call\nif not (os.getenv('INTRINIO_API_KEY') or obb.user.credentials.intrinio_api_key):\n    raise RuntimeError('Intrinio API key not configured - fix before fetching')","typeGuard":null,"tryCatchPattern":"import time\nfrom openbb_core.app.model.abstract.error import OpenBBError\n\nfor attempt in range(5):\n    try:\n        res = obb.equity.filings(provider='intrinio', symbol=sym)\n        break\n    except OpenBBError as e:\n        msg = str(e)\n        if ' 429 ' in msg and attempt < 4:\n            time.sleep(2 ** attempt); continue\n        if ' 401 ' in msg or ' 403 ' in msg:\n            raise CredentialsError('Intrinio rejected the API key') from e\n        if ' 404 ' in msg:\n            skip_symbol(sym); break\n        raise","preventionTips":["Set INTRINIO_API_KEY via obb.user.credentials, verify before batch runs","Backoff on 429; never retry 401/403 without changing the key","Log status+body from the message for fast triage"],"tags":["intrinio","http-error","api-key","rate-limit"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}