{"record":{"id":"61eae7dd4a991c3f","repo":"OpenBB-finance/OpenBB","slug":"the-response-was-returned-empty-with-no-error-mess","errorCode":null,"errorMessage":"The response was returned empty with no error message.","messagePattern":"The response was returned empty with no error message\\.","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/imf/openbb_imf/models/maritime_chokepoint_volume.py","lineNumber":339,"sourceCode":"            ):\n                chokepoint_ids.append(chokepoint)\n            else:\n                raise OpenBBError(\n                    f\"Invalid chokepoint name: {chokepoint}. Expected one of {list(CHOKEPOINTS_NAME_TO_ID.keys())}.\"\n                )\n\n        tasks = [\n            get_one(chokepoint_id) for chokepoint_id in chokepoint_ids if chokepoint_id\n        ]\n\n        task_results = await asyncio.gather(*tasks, return_exceptions=True)\n\n        for task_result in task_results:\n            if isinstance(task_result, Exception):\n                raise OpenBBError(task_result)\n\n        if not results:\n            raise OpenBBError(\"The response was returned empty with no error message.\")\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: ImfMaritimeChokePointVolumeQueryParams,\n        data: list,\n        **kwargs: Any,\n    ) -> list[ImfMaritimeChokePointVolumeData]:\n        \"\"\"Validate and transform the raw data into the model.\"\"\"\n        return [ImfMaritimeChokePointVolumeData(**r) for r in data]\n","sourceCodeStart":321,"sourceCodeEnd":351,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/imf/openbb_imf/models/maritime_chokepoint_volume.py#L321-L351","documentation":"Raised after all per-chokepoint fetch tasks complete without exception but `results` is still empty: every `get_daily_chokepoint_data` returned falsy (typically an empty list) for the requested window. Distinguishes 'API succeeded but no rows' from transport errors in the multi-chokepoint path.","triggerScenarios":"Requesting a start_date/end_date range with no observed activity data (too far in past/future), or chokepoint/date combos the PortWatch daily dataset does not cover (the daily series starts around 2019-2020).","commonSituations":"Backtesting pipelines requesting pre-2019 dates; requesting future dates; date format confusion causing an out-of-range window.","solutions":["Set start_date/end_date within PortWatch daily coverage (roughly 2019-present).","Widen the window and confirm data exists with a broad single request first.","Check date format expectations (YYYY-MM-DD)."],"exampleFix":"# before\nmaritime_chokepoint_volume(chokepoint='Suez Canal', start_date='2015-01-01', end_date='2015-12-31')\n\n# after\nmaritime_chokepoint_volume(chokepoint='Suez Canal', start_date='2024-01-01', end_date='2024-12-31')","handlingStrategy":"validation","validationCode":"from datetime import date\nPORTWATCH_MIN = date(2019, 1, 1)  # daily coverage start\nif start_date and date.fromisoformat(start_date) < PORTWATCH_MIN:\n    start_date = PORTWATCH_MIN.isoformat()  # or reject with a clear message","typeGuard":null,"tryCatchPattern":"except OpenBBError as e:\n    if 'returned empty' in str(e):\n        data = await fetch(start_date=None, end_date=None)  # then slice locally\n    else:\n        raise","preventionTips":["Keep date windows inside PortWatch coverage (~2019+)","Probe with a wide window first, then narrow"],"tags":["imf","portwatch","no-data","date-filter"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}