Skip to content

Commit

Permalink
More clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dpetrick committed May 31, 2022
1 parent 5f89e89 commit 650fc52
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions query-engine/request-handlers/src/graphql/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ impl GraphQlBody {
GraphQlBody::Single(body) => {
let gql_doc = match gql::parse_query(&body.query) {
Ok(doc) => doc,
Err(err) if err.to_string().contains("number too large to fit in target type") | err.to_string().contains("number too small to fit in target type") => {
Err(HandlerError::ValueFitError("Query parsing failure: A number used in the query does not fit into a 64 bit signed integer. Consider using `BigInt` as field type if you're trying to store large integers.".to_owned()))?
Err(err)
if err.to_string().contains("number too large to fit in target type")
| err.to_string().contains("number too small to fit in target type") =>
{
return Err(HandlerError::ValueFitError("Query parsing failure: A number used in the query does not fit into a 64 bit signed integer. Consider using `BigInt` as field type if you're trying to store large integers.".to_owned()));
}
err @ Err(_) => err?,
};
Expand Down

0 comments on commit 650fc52

Please sign in to comment.