Reject unknown config options#216
Conversation
|
👋 Thanks for assigning @tnull as a reviewer! |
c6c0afb to
729308c
Compare
|
Nice not sure if it's related, but I also got upset when my ldk-server-client silently dropped the |
? can you reproduce that seems weird |
Right here, it silently drops the error if the config file failed to parse. ldk-server/ldk-server-cli/src/main.rs Line 566 in 56be35f Wasn't sure if worth fixing |
|
made a fix, good find! |
tankyleo
left a comment
There was a problem hiding this comment.
Let's also reject unknown fields at ldk-server-client/src/config.rs ?
Fail TOML parsing when unsupported config keys are present so typos do not get silently ignored. Keep the LSPS2 service section typed in all builds, while default builds still parse and ignore it unless the experimental feature is enabled.
Before we would silently drop the config if we failed to parse it. This can cause confusion as to why your cli isn't working correctly. Now if you have a config file it'll throw an error if we can't parse it instead of silently dropping it.
4450faa to
d71a479
Compare
done |
I spent too long debugging why my node wasn't working only to find out I misspelled a config option. Now we'll throw an error if we see a config option we don't recognize.
Fail TOML parsing when unsupported config keys are present so typos do not get silently ignored. Keep the LSPS2 service section typed in all builds, while default builds still parse and ignore it unless the experimental feature is enabled.