Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry not behaving as expected #47

Open
omikader opened this issue Apr 1, 2024 · 0 comments
Open

Retry not behaving as expected #47

omikader opened this issue Apr 1, 2024 · 0 comments

Comments

@omikader
Copy link

omikader commented Apr 1, 2024

We noticed that certain unretryable unstructured errors like negative seek value -1 and [Errno 22] Invalid argument were being swallowed by the default retry mechanism provided by the JS client.

Since the JS client does not allow overriding the retryable statusCode values to something more restrictive (e.g. we only want to retry 503), we created our own BackoffStrategy in order to fail sooner, e.g.

new BackoffStrategy(
  500, // initialInterval (ms)
  10 * 1000, // maxInterval (ms)
  1.5, // exponent
  20 * 1000, // maxElapsedTime (ms)
)

However, in our testing, we found that no retry requests are ever actually being sent. We suspect that this is due to how Speakeasy may be consuming the file buffer the first time but we cannot confirm. For now, we've disabled retries at the client level entirely by setting strategy: "none" but this is not our ideal state.

We are on version 0.10.6.

TL;DR

  • Can you make the retry status codes configurable to the end user?
  • Are we using the retry mechanism correctly? Can you confirm our behavior vs the expected behavior?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant