Skip to content

VRL error message for field assignment to non-object has a one-off typo in it #1154

Open
@bruceg

Description

@bruceg

Given the VRL code:

foo = {}
foo.bar.baz = 12

the error message suggestions are missing the leading .:

error[E642]: parent path segment rejects this mutation
  ┌─ :2:9
  │
2 │ foo.bar.baz = 12
  │ ------- ^^^ querying a field of a non-object type is unsupported
  │ │
  │ this path resolves to a value of type undefined
  │
  = try: change parent value to object, before assignment
  =
  =     foobar = {}
  =     foobar.baz = 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions