Skip to content

Commit

Permalink
Pass redis error to upstream instead of sending the generic FalkorDBE…
Browse files Browse the repository at this point in the history
…rror::ParsingArray
  • Loading branch information
barakb committed Nov 4, 2024
1 parent 1cd594f commit a6b56f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/graph/query_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ impl<'a, Output, T: Display, G: HasGraphSchema> QueryBuilder<'a, Output, T, G> {
self,
value: redis::Value,
) -> FalkorResult<QueryResult<LazyResultSet<'a>>> {
if let redis::Value::ServerError(e) = value {
return Err(FalkorDBError::RedisError(
e.details().unwrap_or("Unknown error").to_string(),
));
}

let res = redis_value_as_vec(value)?;

match res.len() {
Expand Down

0 comments on commit a6b56f5

Please sign in to comment.