Closed vsevel closed 2 months ago
@vsevel With #257 you should be catching TimeoutException
, correct?
Well no. I tested. That IS what we are getting. Or we need to convert it when it is raised somewhere
Then #257 wasn't implemented correctly. I think we should be fixing that problem rather than attempting to catch multiple timeouts all over the place; it's just easier to remember.
I'm guessing that https://github.com/quarkiverse/quarkus-vault/blob/b2690ed4f943928e7a6484c7006139d2203fee4b/client/src/main/java/io/quarkus/vault/client/http/jdk/JDKVaultHttpClient.java#L51 needs to unwrap an exception.
Otherwise I don't see how this exception is being passed up the chain.
Ok I will give it a try. It just I feel I have been chasing that one up so many times...
@kdubb this was located in mapError
indeed. I left the original catch, and added the handling of CompletionException
. I do not know if exceptionallyCompose
will always pass a CompletionException
? that is not the case from the signature. but may be in our case that would be?
That's what I thought when I mentioned unwrapping (I couldn't think of which exception it was probably throwing). I seem to remember the CompletionStage
always wraps the exception in java.util.concurrent.CompletionException
.
I'd leave it as is or maybe make it recursive to make it easier to add exceptions to. Of course, then you're relying on Throwable.cause
not being recursive, and I think it sometimes is.
make it recursive to make it easier to add exceptions to. Of course, then you're relying on Throwable.cause not being recursive, and I think it sometimes is.
that is what I was concerned of. I think we can live with the repetition. I will squash then if you are ok.
👍
Fixes https://github.com/quarkiverse/quarkus-vault/issues/278
moved
firstTime = false;
above the call tofetchSecretsFirstTime
added a finally block oncache.set(new VaultCacheEntry<>(properties));
caughtHttpTimeoutException
to reproduce, used toxiproxy with:
and configuration: