Skip to content

Update Retry boolean to handle Exception

Bruce Jin requested to merge retry-handle-exception into master

Type of change

  • Bug Fix
  • Feature

Does this introduce a change in the core logic?

  • [No]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Updates description?

Describe your code changes in details for reviewers (links on Gitlab issues, etc.) Recently, a behavior was observed that when base-client call api with token refresher, it has a chance that system may not have response at all due to the expiration of current token. This will lead to a SSLEOFError in the system and will not trigger a response from our API. Currently, tenacity logic in base_client only handles the situation that the response.status_code is not successful, but in the edge case above, tenacity will be skipped since there will be no response at all. This change will add a logic in tenacity that also trigger a retry if an Exception occurs.

Edited by Bruce Jin

Merge request reports