Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/dexpace-sdk-core/src/dexpace/sdk/core/errors/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def _status_is_retryable(self) -> bool:
def body_snapshot(self, max_bytes: int | None = None) -> bytes:
"""Preview the error response body without consuming it.

Safe to call from logging and post-mortem paths: it never drains a
single-use stream. Bytes are only returned when the body has already
been captured for repeatable reads (a ``LoggableResponseBody``); for
For a LoggableResponseBody, the snapshot drains and caches the inner

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified this against the code and it's accurate — it does drain and cache the inner body on the first read. Only nit: wrap LoggableResponseBody in double backticks to match the rest of the docstring, then it's good to merge.

@Benflow3 Benflow3 Jun 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting has been fixed
Close #41

body on the first access (this initial read is synchronous and
may incur I/O, but subsequent reads are repeatable and fast); for
any other body — or when no response/body is present — an empty
``bytes`` is returned rather than destroying the payload.

Expand Down