fix(router): [Iatapay] make error status and error message optional (#5382)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
AkshayaFoiger
2024-08-02 15:27:59 +05:30
committed by GitHub
parent 4ef3420ee8
commit 37e34e3bfd
2 changed files with 5 additions and 3 deletions

View File

@ -149,7 +149,9 @@ impl ConnectorCommon for Iatapay {
ErrorResponse {
status_code: res.status_code,
code: response.error,
message: response.message,
message: response
.message
.unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
reason: response.reason,
attempt_status: None,
connector_transaction_id: None,

View File

@ -581,9 +581,9 @@ impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>>
#[derive(Debug, Deserialize, Serialize)]
pub struct IatapayErrorResponse {
pub status: u16,
pub status: Option<u16>,
pub error: String,
pub message: String,
pub message: Option<String>,
pub reason: Option<String>,
}