-
Notifications
You must be signed in to change notification settings - Fork 51
Tracker Checker (HTTP): Improve error message when the JSON config is not well-formatted #1042
Copy link
Copy link
Open
Labels
Description
Parent issue: #669
When you run the checker for more than one HTTP tracker and it fails, it only shows an error but not the cause.
How to reproduce
Run the checker without running the tracker:
TORRUST_CHECKER_CONFIG='{
"udp_trackers": [],
"http_trackers": [
"http://127.0.0.1:7070",
"http://127.0.0.1:7070/",
"http://127.0.0.1:7070/announce",
],
"health_checks": []
}' cargo run --bin tracker_checker Finished `dev` profile [optimized + debuginfo] target(s) in 0.09s
Running `target/debug/tracker_checker`
thread 'main' panicked at src/bin/tracker_checker.rs:6:22:
Some checks fail: invalid config format
Caused by:
JSON parse error: trailing comma at line 7 column 5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Reactions are currently unavailable