You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DOCS] Go SDK: retry cancellation preserves the underlying HTTP error #381
A bug fix in the Go SDK changes the error returned when a request's context is cancelled while the retry layer is sleeping between attempts.
What changed
Previously, cancelling the context during backoff returned a bare context.Canceled / context.DeadlineExceeded and dropped the underlying HTTP failure. As of inference-gateway/sdk PR 119, the returned error wraps both:
errors.Is(err, context.Canceled) still reports the cancellation.
The underlying HTTP status (for example HTTP 500) stays visible in the error message and via errors.Is / errors.As.
Affected pages
The Go SDK error-handling / retry documentation (the page that documents retry behavior). Add a note that on cancellation mid-retry the returned error preserves the underlying failure.
Added a "Cancellation preserves the underlying error" note to the Go SDK "Retry and backoff" section in sdks.md. It documents that when the context is cancelled (or its deadline expires) while the retry loop is sleeping between attempts, the returned error now wraps both the underlying transport/HTTP failure and the cancellation cause, formatted as <last error> (cancelled while retrying: <context error>):
errors.Is(err, context.Canceled) / context.DeadlineExceeded still report the cancellation.
The underlying HTTP status (for example HTTP 500) stays readable in the message and via errors.Is / errors.As.
bun run lint:md, bun run format:check, and bun run build all pass. Confirmed the note lands in the server-rendered HTML (dist/sdks/index.html), so it stays indexable. The edit is in the hand-authored retry section, not a generated provider region, so no task generate run was needed.
· branch docs/issue-381-20260710-2131
Activity
edenreich commentedon Jul 10, 2026
@claude Can you document it?
inference-gateway-maintainer commentedon Jul 10, 2026
Claude finished @edenreich's task in 5m 25s —— View job •
docs/issue-381-20260710-2131• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-381-20260710-2131?quick_pull=1&title=Issue%20%23381%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23381%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Documented Go SDK retry cancellation behavior
sdks.md, "Retry and backoff")PR: #382 - docs: note Go SDK retry cancellation preserves HTTP error
What changed
Added a "Cancellation preserves the underlying error" note to the Go SDK "Retry and backoff" section in
sdks.md. It documents that when the context is cancelled (or its deadline expires) while the retry loop is sleeping between attempts, the returned error now wraps both the underlying transport/HTTP failure and the cancellation cause, formatted as<last error> (cancelled while retrying: <context error>):errors.Is(err, context.Canceled)/context.DeadlineExceededstill report the cancellation.errors.Is/errors.As.Includes a short code example, matching the behavior from inference-gateway/sdk#119.
Verification
bun run lint:md,bun run format:check, andbun run buildall pass. Confirmed the note lands in the server-rendered HTML (dist/sdks/index.html), so it stays indexable. The edit is in the hand-authored retry section, not a generated provider region, so notask generaterun was needed.· branch
docs/issue-381-20260710-2131inference-gateway-releaser commentedon Jul 18, 2026
🎉 This issue has been resolved in version 0.9.2 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀