Skip to content

Commit

Permalink
[SELC-5266] fix: modify checkIfIsRetryableException to check if it's …
Browse files Browse the repository at this point in the history
…a ClientWebApplicationException (#165)
  • Loading branch information
giulia-tremolada authored Jul 12, 2024
1 parent 5a92bc8 commit 5bbc794
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
import it.pagopa.selfcare.user.model.TrackEventInput;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.ws.rs.WebApplicationException;
import lombok.extern.slf4j.Slf4j;
import org.bson.BsonDocument;
import org.bson.conversions.Bson;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.jboss.resteasy.reactive.ClientWebApplicationException;
import org.openapi.quarkus.user_registry_json.api.UserApi;

import java.time.Duration;
Expand Down Expand Up @@ -218,7 +218,7 @@ public void consumerToSendScUserEvent(ChangeStreamDocument<UserInstitution> docu

private boolean checkIfIsRetryableException(Throwable throwable) {
return throwable instanceof TimeoutException ||
(throwable instanceof WebApplicationException webApplicationException && webApplicationException.getResponse().getStatus() == 429);
(throwable instanceof ClientWebApplicationException webApplicationException && webApplicationException.getResponse().getStatus() == 429);
}

private TrackEventInput toTrackEventInputByUserInstitution(UserInstitution userInstitution) {
Expand Down

0 comments on commit 5bbc794

Please sign in to comment.