Skip to content

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

Description

Summary

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.

Reference

  • SDK PR: inference-gateway/sdk PR 119
  • SDK issue: inference-gateway/sdk issue 118

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    Fields

    No fields configured for Task.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions