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
It would be great if we could modify these options to customize at least the ExpectedStatusCodes and RetryFunc in some scenarios. The default retryCheck returns true for 5xx responses, but for services like managed HSM, we should not retry on a 503 status code due to capacity check failure.
Since the SDK method signatures are defined and should not change, one way to pass custom information is through the ctx parameter. We can then apply them during the NewRequest method.
If this looks reasonable and acceptable, I'd be happy to submit a PR to add this feature.
Service Name
sdk
API Versions Required
N/A
References
No response
The text was updated successfully, but these errors were encountered:
wuxu92
changed the title
sdk: Feature request of Supporting for customize client optionssdk: Feature request for customizable client options
Nov 13, 2024
Is there an existing issue for this?
Community Note
Currently, the RequestOptions are generated by Pandora and cannot be customized by the method caller. For example, see managedhsms/method_createorupdate.go#L25-L34.
It would be great if we could modify these options to customize at least the
ExpectedStatusCodes
andRetryFunc
in some scenarios. The default retryCheck returns true for 5xx responses, but for services like managed HSM, we should not retry on a 503 status code due to capacity check failure.Proposal
Since the SDK method signatures are defined and should not change, one way to pass custom information is through the
ctx
parameter. We can then apply them during the NewRequest method.If this looks reasonable and acceptable, I'd be happy to submit a PR to add this feature.
Service Name
sdk
API Versions Required
N/A
References
No response
The text was updated successfully, but these errors were encountered: