File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/apify/storage_clients/_apify Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,14 @@ async def _list_head(self) -> None:
236236
237237 # Update the cached data
238238 for request_data in response .get ('items' , []):
239+ # Due to https://github.com/apify/apify-core/blob/v0.1377.0/src/api/src/lib/request_queues/request_queue.ts#L53,
240+ # the list_head endpoint may return truncated fields for long requests (e.g., long URLs or unique keys).
241+ # If truncation is detected, fetch the full request data by its ID from the API.
242+ # This is a temporary workaround - the caching will be refactored to use request IDs instead of unique keys.
243+ # See https://github.com/apify/apify-sdk-python/issues/630 for details.
244+ if '[truncated]' in request_data ['uniqueKey' ] or '[truncated]' in request_data ['url' ]:
245+ request_data = await self ._api_client .get_request (request_id = request_data ['id' ]) # noqa: PLW2901
246+
239247 request = Request .model_validate (request_data )
240248
241249 if request .unique_key in self ._requests_in_progress :
You can’t perform that action at this time.
0 commit comments