Skip to content

Commit

Permalink
adding type information to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
joshfried-aws committed Jun 27, 2023
1 parent d1d2923 commit 2832640
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions guard/src/rules/eval_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,11 @@ fn query_retrieval_with_converter<'value, 'loc: 'value>(
_ => to_unresolved_result(
Rc::clone(&current),
format!(
"Attempting to retrieve from index {} but type is not an array at path {}",
"Attempting to retrieve from index {} but type is not an array at path {}, \
type {}",
index,
current.self_path()
current.self_path(),
current.type_info()
),
&query[query_index..],
),
Expand Down

0 comments on commit 2832640

Please sign in to comment.