Skip to content

Commit

Permalink
fix(pm_auth): Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak1799 committed Dec 5, 2023
1 parent 16d1ee9 commit c76446d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions crates/router/src/core/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions crates/router/src/core/pm_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c76446d

Please sign in to comment.