diff --git a/src/main/java/org/folio/service/orders/lines/update/OrderLinePatchOperationService.java b/src/main/java/org/folio/service/orders/lines/update/OrderLinePatchOperationService.java index 57c63aa36..940d9c0bb 100644 --- a/src/main/java/org/folio/service/orders/lines/update/OrderLinePatchOperationService.java +++ b/src/main/java/org/folio/service/orders/lines/update/OrderLinePatchOperationService.java @@ -131,7 +131,7 @@ private Future updateInventoryInstanceInformation(PatchOrderLineRequest re String newInstanceId = request.getReplaceInstanceRef().getNewInstanceId(); purchaseOrderLineService.getOrderLineById(lineId, requestContext) - .map(poLine -> { + .compose(poLine -> { RequestEntry requestEntry = new RequestEntry(INVENTORY_LOOKUP_ENDPOINTS.get(INSTANCE_RECORDS_BY_ID_ENDPOINT)).withId(newInstanceId); return restClient.getAsJsonObject(requestEntry, requestContext) .compose(instanceRecord -> updatePoLineWithInstanceRecordInfo(instanceRecord, poLine, requestContext))