Skip to content

Commit

Permalink
Revert "CIRC-2023 Handle exception while calling mod-settings (#1421)"
Browse files Browse the repository at this point in the history
This reverts commit 83e92b0.
  • Loading branch information
Vignesh-kalyanasundaram committed Feb 9, 2024
1 parent 71917b5 commit 9f13436
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.util.concurrent.CompletableFuture;

import static org.folio.circulation.support.http.client.CqlQuery.exactMatch;
import static org.folio.circulation.support.results.Result.succeeded;

public class SettingsRepository {
private static final Logger log = LogManager.getLogger(MethodHandles.lookup().lookupClass());
Expand All @@ -39,14 +38,10 @@ public CompletableFuture<Result<CheckoutLockConfiguration>> lookUpCheckOutLockSe
.map(Configuration::getValue)
.map(JsonObject::new)
.orElse(new JsonObject())))
.thenApply(r -> r.map(CheckoutLockConfiguration::from))
.thenApply(r -> r.mapFailure(failure -> {
log.warn("lookUpCheckOutLockSettings:: Error while fetching checkout lock settings {}", failure);
return succeeded(CheckoutLockConfiguration.from(new JsonObject()));
}));
.thenApply(r -> r.map(CheckoutLockConfiguration::from));
} catch (Exception ex) {
log.warn("lookUpCheckOutLockSettings:: Unable to retrieve checkoutLockFeature settings ", ex);
return CompletableFuture.completedFuture(succeeded(CheckoutLockConfiguration.from(new JsonObject())));
return CompletableFuture.completedFuture(Result.succeeded(CheckoutLockConfiguration.from(new JsonObject())));
}
}
}

This file was deleted.

0 comments on commit 9f13436

Please sign in to comment.