refactor(router): add id field in MerchantConnectorAccountNotFound (#1098)

This commit is contained in:
EliKalter
2023-05-10 14:56:45 +03:00
committed by GitHub
parent c5db5c37ec
commit 5214e22f20
4 changed files with 26 additions and 16 deletions

View File

@ -1565,7 +1565,9 @@ pub async fn get_merchant_connector_account(
.find_config_by_key(format!("mcd_{merchant_id}_{creds_identifier}").as_str())
.await
.to_not_found_response(
errors::ApiErrorResponse::MerchantConnectorAccountNotFound,
errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
id: connector_label.to_string(),
},
)?;
#[cfg(feature = "kms")]
@ -1605,7 +1607,9 @@ pub async fn get_merchant_connector_account(
)
.await
.map(MerchantConnectorAccountType::DbVal)
.change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound),
.change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
id: connector_label.to_string(),
}),
}
}