{"record":{"id":"7c5a0eed0165782e","repo":"OpenBB-finance/OpenBB","slug":"error-error-message","errorCode":null,"errorMessage":"Error: {error} -> {message}","messagePattern":"Error: (.+?) -> (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/forward_ebitda_estimates.py","lineNumber":143,"sourceCode":"                results.extend(consensus)\n\n        if symbols:\n            await asyncio.gather(*[get_one(symbol) for symbol in symbols])\n            if not results:\n                raise EmptyDataError(f\"No results were found. -> {query.symbol}\")\n            return results\n\n        async def fetch_callback(response, session):\n            \"\"\"Use callback for pagination.\"\"\"\n            data = await response.json()\n            error = data.get(\"error\", None)\n            if error:\n                message = data.get(\"message\", \"\")\n                if \"api key\" in message.lower():\n                    raise UnauthorizedError(\n                        f\"Unauthorized Intrinio request -> {message}\"\n                    )\n                raise OpenBBError(f\"Error: {error} -> {message}\")\n\n            estimates = data.get(\"ebitda_consensus\", [])  # type: ignore\n            if estimates and len(estimates) > 0:\n                results.extend(estimates)\n                while data.get(\"next_page\"):  # type: ignore\n                    next_page = data[\"next_page\"]  # type: ignore\n                    next_url = f\"{url}&next_page={next_page}\"\n                    data = await amake_request(next_url, session=session, **kwargs)\n                    consensus = (\n                        data.get(\"ebitda_consensus\")\n                        if isinstance(data, dict) and \"ebitda_consensus\" in data\n                        else []\n                    )\n                    if consensus:\n                        results.extend(consensus)  # type: ignore\n            return results\n\n        url = f\"{BASE_URL}&{query_str}\" if query_str else BASE_URL","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_ebitda_estimates.py#L125-L161","documentation":"Generic OpenBBError in the same fetch_callback: the response contained an 'error' key but the message did not mention 'api key'. The message embeds both the Intrinio error code and message ('Error: <error> -> <message>') for diagnosis.","triggerScenarios":"Bulk forward-EBITDA consensus request failing for non-auth reasons: malformed query string parameters (bad dates/page sizing), endpoint temporarily unavailable, plan restrictions worded without 'api key', or deprecated parameter names.","commonSituations":"Passing unsupported filter values to the estimates endpoint; upstream API changes; rate limiting expressed as a generic error payload.","solutions":["Read the embedded '<error> -> <message>' pair; it is Intrinio's verbatim reason","Simplify the query (drop optional filters) to isolate which parameter the API rejects","If the text hints at access/limits, verify plan and key — auth issues sometimes bypass the 'api key' wording","Retry once after a short delay in case of transient upstream errors"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"from openbb_core.provider.abstract.error import OpenBBError\n\ndef is_estimates_request_error(err: BaseException) -> bool:\n    return isinstance(err, OpenBBError) and str(err).startswith(\"Error:\")","tryCatchPattern":"from openbb_core.provider.abstract.error import OpenBBError\n\nfor attempt in range(2):\n    try:\n        res = await obb.equity.estimates.ebitda(provider=\"intrinio\")\n        break\n    except OpenBBError as e:\n        if str(e).startswith(\"Error:\") and attempt == 0:\n            continue  # one retry for transient upstream errors\n        raise","preventionTips":["Parse the 'Error: <code> -> <message>' pair before deciding to retry","Simplify optional filters when the API rejects a parameter combo","Don't retry auth-flavored messages — fix the key/plan"],"tags":["api-error","estimates","intrinio","upstream-error"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}