Skip to content

fix(platform): retry requests that fail to connect - #1932

Draft
PG-Thomas wants to merge 2 commits into
mainfrom
fix/retry-connect-error
Draft

PG-Thomas wants to merge 2 commits into
mainfrom
fix/retry-connect-error

Conversation

@PG-Thomas

@PG-Thomas PG-Thomas commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What broke: sometimes the network drops a connection while it is still being opened. That's like a phone call that hangs up before anyone says hello. The SDK already tries again when a call times out, but not when it hangs up like this. So one dropped connection made the whole step fail. This happened in our nightly tests (AGVSOL-7996): looking up a Coupa connection got httpx.ConnectError: [Errno 104] Connection reset by peer, and the invoice step failed.

The fix: treat httpx.ConnectError as something to retry, with the same backoff and attempt limit as timeouts.

Why this is safe: a ConnectError means the request never left our side, because the connection wasn't up yet. Sending it again can't do anything twice, even for a POST. Errors that can happen after the server already got the request (ReadError, WriteError) are still not retried, and a test pins that.

Testing:

  • New tests check that a POST is retried after a ConnectError, for sync and async calls.
  • A test checks that a ReadError is not retried.
  • The full uipath-platform suite passes, and ruff and mypy are clean.
  • Bumps uipath-platform to 0.2.35.

A connection reset during the TLS handshake raised httpx.ConnectError, which the
platform retry did not cover, so one dropped connection failed the whole call.
A failed connect never sends the request, so it is safe to retry for any method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019eqtRNhyPtxwyQUvKoK5Zy
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Oct 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019eqtRNhyPtxwyQUvKoK5Zy
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant