---
cases:
  - note: jsonremove/error invalid paths type array with numbers
    query: data.generated.p = x
    modules:
      - |
        package generated

        p := __local0__ if {
        	__local2__ = input.x
        	json.remove({"a": {"b": {"c": 123}}}, __local2__, __local1__)
        	__local0__ = __local1__
        }
    input_term: '{"x": ["a", 1, 2, 3]}'
    want_error_code: eval_type_error
    want_error: "json.remove: operand 2 must be one of {set, array} containing string paths or array of path segments but got number"
    strict_error: true
