Skip to content

Config file syntax error reporting is broken. #68

@ximon18

Description

@ximon18
$ cargo run -- --config etc/rotonda.conf
/home/ximon/src/rotonda/etc/rotonda.conf: TOML parse error at line 13, column 1
   |
13 | [targets.mqtt]
   | ^^^^^^^^^^^^^^
invalid digit found in string

???

It is expected that the sample config file doesn't work as it contains placeholders that the operator should fill in or comment out the whole unit/target. In this case the relevant part is:

[targets.mqtt]
type = "mqtt-out"
sources = ["bmp-in", "bgp-in", "rib-in-pre", "rib-in-post"]
client_id = "rotonda"                          # Tip: edit me
topic_template = "{id}"                        # Tip: edit me
destination = "SOME_IP_ADDRESS:SOME_PORT"      # Tip: edit me, or comment this target out

The error is actual caused by the "SOME_IP_ADDRESS:SOME_PORT" value, if you replace that with "127.0.0.1:12345" then the error goes away.

But:

  1. That is not on line number 13 as reported.
  2. The issue is not with the line "[target.mqtt]" as reported.
  3. How is it ever invalid to have a digit in a string? That is a very confusing message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions