mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
feat(authentication): create api for update profile acquirer (#8307)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -285,6 +285,8 @@ pub enum StripeErrorCode {
|
||||
PlatformBadRequest,
|
||||
#[error(error_type = StripeErrorType::HyperswitchError, code = "", message = "Platform Unauthorized Request")]
|
||||
PlatformUnauthorizedRequest,
|
||||
#[error(error_type = StripeErrorType::HyperswitchError, code = "", message = "Profile Acquirer not found")]
|
||||
ProfileAcquirerNotFound,
|
||||
// [#216]: https://github.com/juspay/hyperswitch/issues/216
|
||||
// Implement the remaining stripe error codes
|
||||
|
||||
@ -688,6 +690,9 @@ impl From<errors::ApiErrorResponse> for StripeErrorCode {
|
||||
}
|
||||
errors::ApiErrorResponse::PlatformAccountAuthNotSupported => Self::PlatformBadRequest,
|
||||
errors::ApiErrorResponse::InvalidPlatformOperation => Self::PlatformUnauthorizedRequest,
|
||||
errors::ApiErrorResponse::ProfileAcquirerNotFound { .. } => {
|
||||
Self::ProfileAcquirerNotFound
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -782,6 +787,7 @@ impl actix_web::ResponseError for StripeErrorCode {
|
||||
StatusCode::from_u16(*code).unwrap_or(StatusCode::OK)
|
||||
}
|
||||
Self::LockTimeout => StatusCode::LOCKED,
|
||||
Self::ProfileAcquirerNotFound => StatusCode::NOT_FOUND,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user