IBM / go-sdk-core

The go-sdk-core repository contains core functionality required by Go code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
30 stars 24 forks source link

fix: use consistent retry behavior for 5xx status codes #142

Closed padamstx closed 2 years ago

padamstx commented 2 years ago

This commit modifies the Go core's IBMCloudSDKRetryPolicy() function so that retries associated with 5xx status codes will behave the same as (for example) a 429 status code. Specifically, this means that when retries are exhausted as the result of a 5xx status code, the Go core will return a non-nil DetailedResponse object, similar to a 429 status code and also similar to a "retries disabled" scenario. Previously, a request such as this would result in a non-nil error return value, but a nil DetailedResponse so it was impossible for the caller to inspect the response status code and response headers.

ibm-devx-sdk commented 2 years ago

:tada: This PR is included in version 5.7.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: