mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
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:
@ -149,7 +149,9 @@ impl ConnectorCommon for Iatapay {
|
|||||||
ErrorResponse {
|
ErrorResponse {
|
||||||
status_code: res.status_code,
|
status_code: res.status_code,
|
||||||
code: response.error,
|
code: response.error,
|
||||||
message: response.message,
|
message: response
|
||||||
|
.message
|
||||||
|
.unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
|
||||||
reason: response.reason,
|
reason: response.reason,
|
||||||
attempt_status: None,
|
attempt_status: None,
|
||||||
connector_transaction_id: None,
|
connector_transaction_id: None,
|
||||||
|
|||||||
@ -581,9 +581,9 @@ impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>>
|
|||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
pub struct IatapayErrorResponse {
|
pub struct IatapayErrorResponse {
|
||||||
pub status: u16,
|
pub status: Option<u16>,
|
||||||
pub error: String,
|
pub error: String,
|
||||||
pub message: String,
|
pub message: Option<String>,
|
||||||
pub reason: Option<String>,
|
pub reason: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user