fixed error code

This commit is contained in:
2025-09-19 19:08:00 -04:00
parent 2ad9ed304e
commit 8a6da448bb
2 changed files with 10 additions and 3 deletions

View File

@@ -115,11 +115,15 @@ def create_user_account(db: Session, customer_id: int) -> dict:
try:
auth_profile_id, _ = payment_service.create_customer_profile(customer, card_info)
except ValueError as e:
logger.error(f"API call failed: {e}")
error_str = str(e)
logger.error(f"API call failed: {error_str}")
return {
"success": False,
"message": f"Failed to create customer profile: {str(e)}",
"profile_id": None
"message": f"Failed to create customer profile: {error_str}",
"profile_id": None,
"error_detail": error_str,
"is_duplicate": "E00039" in error_str
}
if not auth_profile_id: