diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rs index a9f1089df218..2ff05e117377 100644 --- a/crates/router/src/core/admin.rs +++ b/crates/router/src/core/admin.rs @@ -1089,13 +1089,14 @@ async fn validate_pm_auth( .into_iter() .find(|mca| mca.merchant_connector_id == conn_choice.mca_id) .ok_or(errors::ApiErrorResponse::GenericNotFoundError { - message: "connector account not found".to_string(), + message: "payment method auth connector account not found".to_string(), }) .into_report()?; if &pm_auth_mca.profile_id != profile_id { return Err(errors::ApiErrorResponse::GenericNotFoundError { - message: "pm auth profile_id differs from connector profile_id".to_string(), + message: "payment method auth profile_id differs from connector profile_id" + .to_string(), }) .into_report(); } diff --git a/crates/router/src/core/pm_auth.rs b/crates/router/src/core/pm_auth.rs index 17e97a5039a2..821f049d8cfc 100644 --- a/crates/router/src/core/pm_auth.rs +++ b/crates/router/src/core/pm_auth.rs @@ -85,7 +85,7 @@ pub async fn create_link_token( && config.payment_method_type == payload.payment_method_type }) .ok_or(ApiErrorResponse::GenericNotFoundError { - message: "connector name not found".to_string(), + message: "payment method auth connector name not found".to_string(), }) .into_report()?; @@ -288,7 +288,7 @@ async fn store_bank_details_in_payment_methods( merchant_account.storage_scheme, ) .await - .change_context(ApiErrorResponse::InternalServerError)?; + .to_not_found_response(ApiErrorResponse::PaymentNotFound)?; let customer_id = payment_intent .customer_id