[fix]: allowing users eligible for only one offer #72

Merged
ameye merged 1 commits from error_handling into master 2025-11-12 15:12:42 +00:00
+3 -3
View File
@@ -180,7 +180,7 @@ class OfferAnalysis:
if real_eligible_amount < original_transaction_offer.min_amount:
logger.error(f"Max eligible amount ({real_eligible_amount}) is less than the minimum offer amount ({original_transaction_offer.min_amount}).")
raise ValueError("You are not eligible for a loan at this time.")
raise ValueError("You are not eligible for a loan at this time - Minimum amount not met.")
# if real_eligible_amount < 100:
# logger.error(f"Max eligible amount ({real_eligible_amount}) is less than the minimum offer amount ({original_transaction_offer.min_amount}).")
@@ -257,7 +257,7 @@ class OfferAnalysis:
})
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.")
logger.error("No eligible offers found for customer: {customer_id} - Minimum amount not met")
raise ValueError("You are not eligible for a loan at this time - Minimum amount not met")
return eligible_offers