Skip to content

docs: note Go SDK retry cancellation preserves HTTP error#382

Merged
edenreich merged 1 commit into
mainfrom
docs/issue-381-20260710-2131
Jul 10, 2026
Merged

docs: note Go SDK retry cancellation preserves HTTP error#382
edenreich merged 1 commit into
mainfrom
docs/issue-381-20260710-2131

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

The Go SDK retry layer changed how it reports errors when a request's context is cancelled while it is sleeping between attempts (inference-gateway/sdk PR 119). The returned error now wraps both the cancellation and the underlying transport/HTTP failure instead of collapsing to a bare context.Canceled / context.DeadlineExceeded.

Changes to sdks.md (Go SDK -> Retry and backoff):

  • Added a "Cancellation preserves the underlying error" note explaining that on cancellation mid-retry the error keeps the failure that triggered the backoff.
  • Documented that errors.Is(err, context.Canceled) / context.DeadlineExceeded still report the cancellation, and the underlying HTTP status stays visible in the message and via errors.Is / errors.As, including the "(cancelled while retrying: ...)" wrap format and a short code example.

Verified with lint:md, format:check, and build; the note is server-rendered into the built HTML.

Closes #381

@inference-gateway-maintainer inference-gateway-maintainer Bot requested a review from a team as a code owner July 10, 2026 21:36
@edenreich edenreich merged commit e39bcab into main Jul 10, 2026
1 check passed
@edenreich edenreich deleted the docs/issue-381-20260710-2131 branch July 10, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Go SDK: retry cancellation preserves the underlying HTTP error

1 participant