mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
refactor: refactor connector auth type failure to 4xx (#2616)
This commit is contained in:
@ -701,11 +701,10 @@ pub async fn create_payment_connector(
|
||||
message: "The connector name is invalid".to_string(),
|
||||
})
|
||||
}
|
||||
errors::ConnectorError::InvalidConfig { field_name } => {
|
||||
err.change_context(errors::ApiErrorResponse::InvalidRequestData {
|
||||
errors::ConnectorError::InvalidConnectorConfig { config: field_name } => err
|
||||
.change_context(errors::ApiErrorResponse::InvalidRequestData {
|
||||
message: format!("The {} is invalid", field_name),
|
||||
})
|
||||
}
|
||||
}),
|
||||
errors::ConnectorError::FailedToObtainAuthType => {
|
||||
err.change_context(errors::ApiErrorResponse::InvalidRequestData {
|
||||
message: "The auth type is invalid for the connector".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user