From 64a29e6c797bafccc94413fbfcf7cfabc6648544 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Thu, 8 Oct 2026 09:40:20 +0200 Subject: [PATCH 1/2] docs: document the 404 behavior of `log.get_as_bytes()` --- src/apify_client/_resource_clients/log.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/apify_client/_resource_clients/log.py b/src/apify_client/_resource_clients/log.py index f8f8cdd5..42e46dd2 100644 --- a/src/apify_client/_resource_clients/log.py +++ b/src/apify_client/_resource_clients/log.py @@ -69,6 +69,10 @@ def get_as_bytes(self, *, raw: bool = False, timeout: Timeout = 'long') -> bytes https://docs.apify.com/api/v2#/reference/logs/log/get-log + 404s collapse to `None` only when this client targets a specific log by ID (e.g. + `client.log(run_id).get_as_bytes()`). For chained clients without a `resource_id` (e.g. + `run.log().get_as_bytes()`), a 404 is ambiguous and propagates. + Args: raw: If true, the log will include formatting. For example, coloring character sequences. timeout: Timeout for the API HTTP request. @@ -177,6 +181,10 @@ async def get_as_bytes(self, *, raw: bool = False, timeout: Timeout = 'long') -> https://docs.apify.com/api/v2#/reference/logs/log/get-log + 404s collapse to `None` only when this client targets a specific log by ID (e.g. + `client.log(run_id).get_as_bytes()`). For chained clients without a `resource_id` (e.g. + `run.log().get_as_bytes()`), a 404 is ambiguous and propagates. + Args: raw: If true, the log will include formatting. For example, coloring character sequences. timeout: Timeout for the API HTTP request. From 393fb4a2539f7ecc6ebe45cdba3df4dae65a09b4 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Thu, 8 Oct 2026 09:43:01 +0200 Subject: [PATCH 2/2] docs: document the 404 behavior of `log.stream()` --- src/apify_client/_resource_clients/log.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/apify_client/_resource_clients/log.py b/src/apify_client/_resource_clients/log.py index 42e46dd2..21127aa4 100644 --- a/src/apify_client/_resource_clients/log.py +++ b/src/apify_client/_resource_clients/log.py @@ -101,6 +101,9 @@ def stream(self, *, raw: bool = False, timeout: Timeout = 'long') -> Iterator[Ht https://docs.apify.com/api/v2#/reference/logs/log/get-log + 404s collapse to `None` only when this client targets a specific log by ID (e.g. `client.log(run_id).stream()`). + For chained clients without a `resource_id` (e.g. `run.log().stream()`), a 404 is ambiguous and propagates. + Args: raw: If true, the log will include formatting. For example, coloring character sequences. timeout: Timeout for the API HTTP request. @@ -213,6 +216,9 @@ async def stream(self, *, raw: bool = False, timeout: Timeout = 'long') -> Async https://docs.apify.com/api/v2#/reference/logs/log/get-log + 404s collapse to `None` only when this client targets a specific log by ID (e.g. `client.log(run_id).stream()`). + For chained clients without a `resource_id` (e.g. `run.log().stream()`), a 404 is ambiguous and propagates. + Args: raw: If true, the log will include formatting. For example, coloring character sequences. timeout: Timeout for the API HTTP request.