fix: throw PreconditionFailed error when routing_algorithm is not configured (#1017)

Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Chethan Rao
2023-05-08 19:18:58 +05:30
committed by GitHub
parent 64721b80ae
commit 8853702f4b
3 changed files with 15 additions and 11 deletions

View File

@ -200,17 +200,17 @@ impl ByteSliceExt for [u8] {
///
/// Extending functionalities of `serde_json::Value` for performing parsing
///
pub trait ValueExt<T> {
pub trait ValueExt {
///
/// Convert `serde_json::Value` into type `<T>` by using `serde::Deserialize`
///
fn parse_value(self, type_name: &str) -> CustomResult<T, errors::ParsingError>
fn parse_value<T>(self, type_name: &str) -> CustomResult<T, errors::ParsingError>
where
T: serde::de::DeserializeOwned;
}
impl<T> ValueExt<T> for serde_json::Value {
fn parse_value(self, type_name: &str) -> CustomResult<T, errors::ParsingError>
impl ValueExt for serde_json::Value {
fn parse_value<T>(self, type_name: &str) -> CustomResult<T, errors::ParsingError>
where
T: serde::de::DeserializeOwned,
{
@ -225,11 +225,11 @@ impl<T> ValueExt<T> for serde_json::Value {
}
}
impl<T, MaskingStrategy> ValueExt<T> for Secret<serde_json::Value, MaskingStrategy>
impl<MaskingStrategy> ValueExt for Secret<serde_json::Value, MaskingStrategy>
where
MaskingStrategy: Strategy<serde_json::Value>,
{
fn parse_value(self, type_name: &str) -> CustomResult<T, errors::ParsingError>
fn parse_value<T>(self, type_name: &str) -> CustomResult<T, errors::ParsingError>
where
T: serde::de::DeserializeOwned,
{