diff --git a/NEWS.md b/NEWS.md index 00987bc11..51ce8d64a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -18,6 +18,7 @@ * Implement instance-date-types endpoint ([MODINVSTOR-1235](https://folio-org.atlassian.net/browse/MODINVSTOR-1235)) * Implement Subject types management ([MODINVSTOR-1221](https://folio-org.atlassian.net/browse/MODINVSTOR-1221)) * Implement endpoint to publish reindex event for the range of instance/item/holding records ([MODINVSTOR-1230](https://folio-org.atlassian.net/browse/MODINVSTOR-1230)) +* Info, not warn, about expected 403 from /user-tenants ([MODINVSTOR-1237](https://folio-org.atlassian.net/browse/MODINVSTOR-1237)) ### Bug fixes * Unintended update of instance records \_version (optimistic locking) whenever any of its holdings or items are created, updated or deleted. ([MODINVSTOR-1186](https://folio-org.atlassian.net/browse/MODINVSTOR-1186)) diff --git a/src/main/java/org/folio/services/caches/ConsortiumDataCache.java b/src/main/java/org/folio/services/caches/ConsortiumDataCache.java index 4db1905da..675a70a08 100644 --- a/src/main/java/org/folio/services/caches/ConsortiumDataCache.java +++ b/src/main/java/org/folio/services/caches/ConsortiumDataCache.java @@ -68,14 +68,15 @@ private CompletableFuture> loadConsortiumData(String te headers.forEach(request::putHeader); return request.send().compose(response -> { + if (response.statusCode() == HTTP_FORBIDDEN) { + LOG.info("loadConsortiumData:: Skipping for tenant {} because {} returns 403 (forbidden)", + tenantId, USER_TENANTS_PATH); + return Future.succeededFuture(Optional.empty()); + } if (response.statusCode() != HTTP_OK) { String msg = String.format("Error loading consortium data, tenantId: '%s' response status: '%s', body: '%s'", tenantId, response.statusCode(), response.bodyAsString()); LOG.warn("loadConsortiumData:: {}", msg); - if (response.statusCode() == HTTP_FORBIDDEN) { - return Future.succeededFuture(Optional.empty()); - } - return Future.failedFuture(msg); } JsonArray userTenants = response.bodyAsJsonObject().getJsonArray(USER_TENANTS_FIELD);