mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
fix(core): [REFUNDS] Fix Not Supported Connector Error (#4045)
This commit is contained in:
@ -160,6 +160,12 @@ impl<T> ConnectorErrorExt<T> for error_stack::Result<T, errors::ConnectorError>
|
|||||||
}
|
}
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
errors::ConnectorError::NotSupported { message, connector } => {
|
||||||
|
errors::ApiErrorResponse::NotSupported {
|
||||||
|
message: format!("{message} is not supported by {connector}"),
|
||||||
|
}
|
||||||
|
.into()
|
||||||
|
}
|
||||||
errors::ConnectorError::FailedToObtainIntegrationUrl
|
errors::ConnectorError::FailedToObtainIntegrationUrl
|
||||||
| errors::ConnectorError::RequestEncodingFailed
|
| errors::ConnectorError::RequestEncodingFailed
|
||||||
| errors::ConnectorError::RequestEncodingFailedWithReason(_)
|
| errors::ConnectorError::RequestEncodingFailedWithReason(_)
|
||||||
@ -178,7 +184,6 @@ impl<T> ConnectorErrorExt<T> for error_stack::Result<T, errors::ConnectorError>
|
|||||||
| errors::ConnectorError::FailedToObtainCertificate
|
| errors::ConnectorError::FailedToObtainCertificate
|
||||||
| errors::ConnectorError::NoConnectorMetaData
|
| errors::ConnectorError::NoConnectorMetaData
|
||||||
| errors::ConnectorError::FailedToObtainCertificateKey
|
| errors::ConnectorError::FailedToObtainCertificateKey
|
||||||
| errors::ConnectorError::NotSupported { .. }
|
|
||||||
| errors::ConnectorError::FlowNotSupported { .. }
|
| errors::ConnectorError::FlowNotSupported { .. }
|
||||||
| errors::ConnectorError::CaptureMethodNotSupported
|
| errors::ConnectorError::CaptureMethodNotSupported
|
||||||
| errors::ConnectorError::MissingConnectorMandateID
|
| errors::ConnectorError::MissingConnectorMandateID
|
||||||
|
|||||||
@ -219,6 +219,16 @@ pub async fn trigger_refund_to_gateway(
|
|||||||
updated_by: storage_scheme.to_string(),
|
updated_by: storage_scheme.to_string(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
errors::ConnectorError::NotSupported { message, connector } => {
|
||||||
|
Some(storage::RefundUpdate::ErrorUpdate {
|
||||||
|
refund_status: Some(enums::RefundStatus::Failure),
|
||||||
|
refund_error_message: Some(format!(
|
||||||
|
"{message} is not supported by {connector}"
|
||||||
|
)),
|
||||||
|
refund_error_code: Some("NOT_SUPPORTED".to_string()),
|
||||||
|
updated_by: storage_scheme.to_string(),
|
||||||
|
})
|
||||||
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
// Update the refund status as failure if connector_error is NotImplemented
|
// Update the refund status as failure if connector_error is NotImplemented
|
||||||
|
|||||||
Reference in New Issue
Block a user