Skip to content
Merged
Changes from all commits
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
5 changes: 0 additions & 5 deletions slack_sdk/web/async_internal_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ async def _request_with_session(
)

last_error: Optional[Exception] = None
resp: Optional[Dict[str, Any]] = None
try:
retry_request = RetryHttpRequest(
method=http_verb,
Expand Down Expand Up @@ -217,12 +216,8 @@ def convert_params(values: dict) -> dict:
if retry_state.next_attempt_requested is False:
raise last_error

if resp is not None:
return resp
raise last_error # type: ignore[misc]

@mwbrooks mwbrooks Nov 26, 2026 •

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.

thought: After 100 response-driven retries (say a handler that keeps retrying 429s), last_error is still None here and this raises a TypeError, while the sync client returns its last resp. Not from this PR, but it could make a good follow-up to bring the two in line.


finally:
if not use_running_session:
await session.close() # type: ignore[union-attr]

return response
Loading