diff --git a/app/api/services/offer_analysis.py b/app/api/services/offer_analysis.py index b481ca7..13f4645 100644 --- a/app/api/services/offer_analysis.py +++ b/app/api/services/offer_analysis.py @@ -225,7 +225,8 @@ class OfferAnalysis: if approved_amount < offer.min_amount: logger.error(f"Max eligible amount ({approved_amount}) is less than the minimum offer amount ({offer.min_amount}).") - raise ValueError("You are not eligible for a loan at this time.") + continue + # raise ValueError("You are not eligible for a loan at this time.") # if approved_amount < 100: # logger.error(f"Max eligible amount ({approved_amount}) is less than the minimum offer amount ({offer.min_amount}).") @@ -255,4 +256,8 @@ class OfferAnalysis: "tenor": offer.tenor }) + if not eligible_offers: + logger.error("No eligible offers found for customer: {customer_id}.") + raise ValueError("You are not eligible for a loan at this time.") + return eligible_offers \ No newline at end of file