mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
feat(router): implement API endpoints for managing API keys (#511)
This commit is contained in:
@ -94,6 +94,9 @@ pub enum StripeErrorCode {
|
||||
#[error(error_type = StripeErrorType::InvalidRequestError, code = "resource_missing", message = "No such mandate")]
|
||||
MandateNotFound,
|
||||
|
||||
#[error(error_type = StripeErrorType::InvalidRequestError, code = "resource_missing", message = "No such API key")]
|
||||
ApiKeyNotFound,
|
||||
|
||||
#[error(error_type = StripeErrorType::InvalidRequestError, code = "parameter_missing", message = "Return url is not available")]
|
||||
ReturnUrlUnavailable,
|
||||
|
||||
@ -383,6 +386,7 @@ impl From<errors::ApiErrorResponse> for StripeErrorCode {
|
||||
Self::MerchantConnectorAccountNotFound
|
||||
}
|
||||
errors::ApiErrorResponse::MandateNotFound => Self::MandateNotFound,
|
||||
errors::ApiErrorResponse::ApiKeyNotFound => Self::ApiKeyNotFound,
|
||||
errors::ApiErrorResponse::MandateValidationFailed { reason } => {
|
||||
Self::PaymentIntentMandateInvalid { message: reason }
|
||||
}
|
||||
@ -453,6 +457,7 @@ impl actix_web::ResponseError for StripeErrorCode {
|
||||
| Self::MerchantAccountNotFound
|
||||
| Self::MerchantConnectorAccountNotFound
|
||||
| Self::MandateNotFound
|
||||
| Self::ApiKeyNotFound
|
||||
| Self::DuplicateMerchantAccount
|
||||
| Self::DuplicateMerchantConnectorAccount
|
||||
| Self::DuplicatePaymentMethod
|
||||
|
||||
Reference in New Issue
Block a user