mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
fix(payments): update error handling for payment void v2 (#9595)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -4992,6 +4992,9 @@ pub struct PaymentsCancelResponse {
|
||||
/// The url to which user must be redirected to after completion of the purchase
|
||||
#[schema(value_type = Option<String>)]
|
||||
pub return_url: Option<common_utils::types::Url>,
|
||||
|
||||
/// Error details for the payment
|
||||
pub error: Option<ErrorDetails>,
|
||||
}
|
||||
|
||||
#[derive(Default, Clone, Debug, Eq, PartialEq, serde::Serialize)]
|
||||
@ -6284,6 +6287,8 @@ pub struct ErrorDetails {
|
||||
pub code: String,
|
||||
/// The error message
|
||||
pub message: String,
|
||||
/// The detailed error reason that was returned by the connector.
|
||||
pub reason: Option<String>,
|
||||
/// The unified error code across all connectors.
|
||||
/// This can be relied upon for taking decisions based on the error.
|
||||
pub unified_code: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user