From ce825c912d6ba760f36a8c393623c284579674d0 Mon Sep 17 00:00:00 2001 From: Wandji Collins Date: Sun, 17 Jan 2021 17:04:06 +0100 Subject: [PATCH] FINERACT-1157:UnsupportedOperationException at InteropServiceImpl --- .../fineract/interoperation/service/InteropServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java index 78351a6ef..89eccabc7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java @@ -558,7 +558,7 @@ public class InteropServiceImpl implements InteropService { MoneyData requestFee = request.getFspFee(); if (requestFee != null) { if (!savingsAccount.getCurrency().getCode().equals(requestFee.getCurrency())) { - throw new UnsupportedOperationException(); + throw new HttpClientErrorException(HttpStatus.resolve(400)); } // TODO: compare with calculated quote fee total = MathUtil.add(total, requestFee.getAmount()); @@ -566,7 +566,7 @@ public class InteropServiceImpl implements InteropService { MoneyData requestCommission = request.getFspCommission(); if (requestCommission != null) { if (!savingsAccount.getCurrency().getCode().equals(requestCommission.getCurrency())) { - throw new UnsupportedOperationException(); + throw new HttpClientErrorException(HttpStatus.resolve(400)); } // TODO: compare with calculated quote commission total = MathUtil.subtractToZero(total, requestCommission.getAmount());