FFM-12088 Retry on HTTP status code 0 #44
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Http code 0 is returned by the typheous client for any uncategorised http errors. We should be able to assume most of the uncategorised attempts to connect to SaaS / Proxy are transient, and allow the SDK to retry. This PR adds
0
to the list of retryable codes.-1
was being returned due to a bug in the OpenAPi generator, which meant the retryable codes were not being properly evaluated. This returns the code if it exists, or -1 if notAdds an optional
timeout_ms
parameter towait_for_initialized
Testing
Used local proxy tool to
0
for auth attempts. SDK retries404
for auth attempts, SDk does not retrytimeout_ms
argument and delay auth, thewait_for_initialization
call unblocks and the SDK serves defaults