mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
refactor(payouts): Propagate Not Implemented error (#3429)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -589,6 +589,17 @@ impl
|
||||
types::PayoutsResponseData,
|
||||
> for Wise
|
||||
{
|
||||
fn build_request(
|
||||
&self,
|
||||
_req: &types::PayoutsRouterData<api::PoEligibility>,
|
||||
_connectors: &settings::Connectors,
|
||||
) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
|
||||
// Eligiblity check for cards is not implemented
|
||||
Err(
|
||||
errors::ConnectorError::NotImplemented("Payout Eligibility for Wise".to_string())
|
||||
.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "payouts")]
|
||||
|
||||
@ -461,6 +461,13 @@ impl<T> ConnectorErrorExt<T> for error_stack::Result<T, errors::ConnectorError>
|
||||
message: format!("{} by {}", message, connector),
|
||||
}
|
||||
}
|
||||
errors::ConnectorError::NotImplemented(reason) => {
|
||||
errors::ApiErrorResponse::NotImplemented {
|
||||
message: errors::api_error_response::NotImplementedMessage::Reason(
|
||||
reason.to_string(),
|
||||
),
|
||||
}
|
||||
}
|
||||
_ => errors::ApiErrorResponse::InternalServerError,
|
||||
};
|
||||
err.change_context(error)
|
||||
|
||||
Reference in New Issue
Block a user