Skip to content

Commit

Permalink
refactor(core): error thrown for wrong mca in applepay_verification f…
Browse files Browse the repository at this point in the history
…low change from 5xx to 4xx (#2189)
  • Loading branch information
prajjwalkumar17 authored Sep 20, 2023
1 parent 081545e commit 656e710
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/router/src/core/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use error_stack::ResultExt;
use external_services::kms;

use crate::{
core::errors::{self, api_error_response, utils::StorageErrorExt},
core::errors::{self, api_error_response},
headers, logger,
routes::AppState,
services, types,
Expand Down Expand Up @@ -120,7 +120,7 @@ pub async fn get_verified_apple_domains_with_mid_mca_id(
let key_store = db
.get_merchant_key_store_by_merchant_id(&merchant_id, &db.get_master_key().to_vec().into())
.await
.to_not_found_response(errors::ApiErrorResponse::InternalServerError)?;
.change_context(api_error_response::ApiErrorResponse::MerchantAccountNotFound)?;

let verified_domains = db
.find_by_merchant_connector_account_merchant_id_merchant_connector_id(
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/routes/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ impl Verify {
web::scope("/verify")
.app_data(web::Data::new(state))
.service(
web::resource("/{merchant_id}/apple_pay")
web::resource("/apple_pay/{merchant_id}")
.route(web::post().to(apple_pay_merchant_registration)),
)
.service(
Expand Down

0 comments on commit 656e710

Please sign in to comment.