-
Notifications
You must be signed in to change notification settings - Fork 595
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
Can't turn auto retries standard on #506
Comments
The retry thing is for HTTP failures that contain a "Retry-After" header. What we have here is no response at all. I'm not really sure how it managed to do that, It really should have thrown some kind ConnectException if you timed out. You can override the RetryStrategy in the config to give it custom behavior, without any kind of response at all the current strategy can't know how long it needs to wait, but you can set that behavior. Although if you cannot connect after 60000 millies I doubt you will survive another run. I'm going to add a null check I guess, which will simply skip the retry if there is no response at all |
Yeah it makes sense what you saying about the response, but if I change retryAfter(true) to retryAfter(false) everything works fine. The same API and no other changes. In addition to this this missing response behaviour I can see across multiple different API providers. I am running odds comparison website and call around 20 different bookmakers APIs and the behaviour is the same. So it can't be the case that API is not returning the response. |
I cannot recreate this. Unirest has a large suite of behavioral tests that stand up a real Javalin server and then makes requests to it. There is a suite of tests for the retry logic, which works in those conditions. If you can provide an recreateable test then we could work with that, but every attempt I made either worked, or resulted in some other IO error |
Just created very basic example with one of the open bookie API:
When you invoke callApi() method you get:
If you change .retryAfter(true) to .retryAfter(false) you get success 200 response. My Pom has only following dependencies:
|
Ah I see, you are using the |
…that other things like retry logic and interceptors can function properly
4.2.3 should have the fix, might take a bit to get though all the Maven central pipelines |
Roughly when should I expect this release? |
Maven Central is a mystery, anywhere between 1 minute and 1 day. Nobody knows |
I'm going to open a issue with Maven Central. |
they showed up now. Closing this |
Describe the bug
I turned retries on by setting retryAfter(true)
But i get an exception
Environmental Data:
The text was updated successfully, but these errors were encountered: