Skip to content

Commit

Permalink
fix(connector): make few fields optional in struct NetceteraErrorDeta…
Browse files Browse the repository at this point in the history
…ils (#4827)
  • Loading branch information
hrithikesh026 authored Jun 3, 2024
1 parent d84e624 commit 69b2f76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/router/src/connector/netcetera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl ConnectorCommon for Netcetera {
status_code: res.status_code,
code: response.error_details.error_code,
message: response.error_details.error_description,
reason: Some(response.error_details.error_detail),
reason: response.error_details.error_detail,
attempt_status: None,
connector_transaction_id: None,
})
Expand Down
14 changes: 7 additions & 7 deletions crates/router/src/connector/netcetera/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ impl
NetceteraPreAuthenticationResponse::Failure(error_response) => {
Err(types::ErrorResponse {
code: error_response.error_details.error_code,
message: error_response.error_details.error_detail,
reason: Some(error_response.error_details.error_description),
message: error_response.error_details.error_description,
reason: error_response.error_details.error_detail,
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
Expand Down Expand Up @@ -174,8 +174,8 @@ impl
}
NetceteraAuthenticationResponse::Error(error_response) => Err(types::ErrorResponse {
code: error_response.error_details.error_code,
message: error_response.error_details.error_detail,
reason: Some(error_response.error_details.error_description),
message: error_response.error_details.error_description,
reason: error_response.error_details.error_detail,
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: None,
Expand Down Expand Up @@ -235,20 +235,20 @@ pub struct NetceteraErrorDetails {
pub error_code: String,

/// Code indicating the 3-D Secure component that identified the error.
pub error_component: String,
pub error_component: Option<String>,

/// Text describing the problem identified.
pub error_description: String,

/// Additional detail regarding the problem identified.
pub error_detail: String,
pub error_detail: Option<String>,

/// Universally unique identifier for the transaction assigned by the 3DS SDK.
#[serde(rename = "sdkTransID")]
pub sdk_trans_id: Option<String>,

/// The Message Type that was identified as erroneous.
pub error_message_type: String,
pub error_message_type: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
Expand Down

0 comments on commit 69b2f76

Please sign in to comment.