# object: { "message": "bananas and another ant" }
# result:
#
# error[E103]: unhandled fallible assignment
#   ┌─ :3:6
#   │
# 3 │ .a = sha3(.result[0].an)
#   │ ---- ^^^^^^^^^^^^^^^^^^^
#   │ │    │
#   │ │    this expression is fallible because at least one argument's type cannot be verified to be valid
#   │ │    update the expression to be infallible by adding a `!`: `sha3!(.result[0].an)`
#   │ │    `.result[0].an` argument type is `string or undefined` and this function expected a parameter `value` of type `string`
#   │ or change this to an infallible assignment:
#   │ .a, err = sha3(.result[0].an)
#   │
#   = see documentation about error handling at https://errors.vrl.dev/#handling
#   = see functions characteristics documentation at https://vrl.dev/expressions/#function-call-characteristics
#   = learn more about error code 103 at https://errors.vrl.dev/103
#   = see language documentation at https://vrl.dev
#   = try your code in the VRL REPL, learn more at https://vrl.dev/examples

.result = parse_regex_all!(.message, r'(?P<an>an.)')
.a = sha3(.result[0].an)

.result
"can't work since all array access is error prone"