Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration Errors in YAML when encountering null value #22327

Open
nomalord opened this issue Jan 30, 2025 · 2 comments
Open

Configuration Errors in YAML when encountering null value #22327

nomalord opened this issue Jan 30, 2025 · 2 comments
Labels
domain: config Anything related to configuring Vector

Comments

@nomalord
Copy link

When configuring vector in YAML, if a null value is encountered, a non indicative error is raised.
Basic example using amqp source (generated by the generate command):

sinks:
  output:
    inputs: [test]
    connection_string: amqp://localhost:5672/%2f
    exchange: test
    routing_key: /
    type: amqp
    encoding:
      codec: json
    healthcheck:
      enabled: true
      uri: null
    buffer:
      type: memory
      max_events: 500
      when_full: block

The error returned is:

invalid type: unit value, expected any valid TOML value
@pront pront added the domain: config Anything related to configuring Vector label Jan 30, 2025
@pront
Copy link
Member

pront commented Jan 30, 2025

Hi @nomalord, thanks for reporting this. Although YAML supports null, TOML doesn't. I agree we need to improve the diagnostic message here.

@jszwedko
Copy link
Member

jszwedko commented Jan 30, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: config Anything related to configuring Vector
Projects
None yet
Development

No branches or pull requests

3 participants