File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ class StreamableHTTPReconnectionOptions:
7474 reconnection_delay_grow_factor : float = 1.5
7575 max_retries : int = 2
7676
77+ def __post_init__ (self ) -> None :
78+ if self .initial_reconnection_delay > self .max_reconnection_delay :
79+ raise ValueError ("initial_reconnection_delay cannot exceed max_reconnection_delay" )
80+
7781
7882@dataclass
7983class RequestContext :
@@ -617,6 +621,11 @@ async def resume_stream(
617621 await on_resumption_token (sse .id )
618622
619623 except httpx .HTTPStatusError as exc :
624+ # Read response body so consumers can access error details
625+ try :
626+ await exc .response .aread ()
627+ except Exception :
628+ pass # Best effort - don't fail if we can't read body
620629 if exc .response .status_code == 405 :
621630 logger .debug ("Server does not support SSE resumption via GET" ) # pragma: no cover
622631 else :
You can’t perform that action at this time.
0 commit comments