mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-25 06:00:08 +01:00
fix the returned error when asc desc fails to be parsed
This commit is contained in:
parent
fe9f380993
commit
78b0bce9a1
@ -156,7 +156,7 @@ impl FromStr for AscDesc {
|
|||||||
match text.rsplit_once(':') {
|
match text.rsplit_once(':') {
|
||||||
Some((left, "asc")) => Ok(AscDesc::Asc(left.parse()?)),
|
Some((left, "asc")) => Ok(AscDesc::Asc(left.parse()?)),
|
||||||
Some((left, "desc")) => Ok(AscDesc::Desc(left.parse()?)),
|
Some((left, "desc")) => Ok(AscDesc::Desc(left.parse()?)),
|
||||||
_ => Err(UserError::InvalidRankingRuleName { name: text.to_string() }),
|
_ => Err(UserError::InvalidAscDescSyntax { name: text.to_string() }),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user