refactor(payments): attempt to address unintended 5xx and 4xx in payments (#1376)

This commit is contained in:
Abhishek Marrivagu
2023-06-15 13:20:48 +05:30
committed by GitHub
parent 71c0d4c500
commit cf64862dac
4 changed files with 24 additions and 26 deletions

View File

@ -935,7 +935,7 @@ pub async fn create_customer_if_not_exist<'a, F: Clone, R>(
None => None,
Some(customer_id) => db
.find_customer_optional_by_customer_id_merchant_id(customer_id, merchant_id)
.await?
.await? // if customer_id is present in payment_intent but not found in customer table then shouldn't an error be thrown ?
.map(Ok),
},
};