refactor(connector): [AdyenPlatform]Throw 4xx instead of 5xx for source_balance_account (#4990)

This commit is contained in:
Sakil Mostak
2024-06-26 18:58:04 +05:30
committed by GitHub
parent cd5a1a34c5
commit 1c464acc56

View File

@ -480,6 +480,11 @@ impl<T> ConnectorErrorExt<T> for error_stack::Result<T, errors::ConnectorError>
message: errors::NotImplementedMessage::Reason(reason.to_string()),
}
}
errors::ConnectorError::InvalidConnectorConfig { config } => {
errors::ApiErrorResponse::InvalidConnectorConfiguration {
config: config.to_string(),
}
}
_ => errors::ApiErrorResponse::InternalServerError,
};
err.change_context(error)