FINERACT-2081: Retrieving Loan Product details with invalid external-id results in 500 error
This commit is contained in:
committed by
Adam Saghy
parent
d57e72ec2f
commit
8d12bc04e9
+5
-1
@@ -104,7 +104,11 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
|
||||
@Override
|
||||
public LoanProduct retrieveLoanProductByExternalId(final ExternalId externalId) {
|
||||
return loanProductRepository.findByExternalId(externalId);
|
||||
final LoanProduct loanProduct = loanProductRepository.findByExternalId(externalId);
|
||||
if (loanProduct == null) {
|
||||
throw new LoanProductNotFoundException(externalId);
|
||||
}
|
||||
return loanProduct;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user