Ignore PodFaultException in cancelBolus

This commit is contained in:
Bart Sopers 2019-12-08 19:10:12 +01:00
parent e350856161
commit 4beb62700b

View file

@ -245,7 +245,13 @@ public class OmnipodManager {
throw new IllegalDeliveryStatusException(DeliveryStatus.BOLUS_IN_PROGRESS, podState.getLastDeliveryStatus()); throw new IllegalDeliveryStatusException(DeliveryStatus.BOLUS_IN_PROGRESS, podState.getLastDeliveryStatus());
} }
try {
executeAndVerify(() -> communicationService.executeAction(new CancelDeliveryAction(podState, DeliveryType.BOLUS, acknowledgementBeep))); executeAndVerify(() -> communicationService.executeAction(new CancelDeliveryAction(podState, DeliveryType.BOLUS, acknowledgementBeep)));
} catch (PodFaultException ex) {
if (isLoggingEnabled()) {
LOG.info("Ignoring PodFaultException in cancelBolus", ex);
}
}
activeBolusData.getDisposables().dispose(); activeBolusData.getDisposables().dispose();
activeBolusData.getBolusCompletionSubject().onSuccess(new BolusDeliveryResult(activeBolusData.estimateUnitsDelivered())); activeBolusData.getBolusCompletionSubject().onSuccess(new BolusDeliveryResult(activeBolusData.estimateUnitsDelivered()));