What happened
When I tried updating several devnet settings in one command, I noticed that an invalid value produced an error that only listed the allowed values. It did not tell me which setting I needed to fix.
It would be helpful if the message included the setting name and the value I entered, especially when changing several settings at once.
Environment
- OffCKB
0.4.13, installed from npm and confirmed with offckb --version.
- macOS, arm64; CKB
0.207.0.
Steps to reproduce
-
Use a disposable devnet that has been initialized and stopped. If needed, start and stop it first, replacing /path/to/ckb with your local CKB executable:
offckb node --daemon --binary-path /path/to/ckb
offckb node stop
-
Try updating these three settings. The last one deliberately uses maybe for whether logs should use color; this setting expects a value such as true or false:
offckb --json devnet config \
--set ckb.logger.filter=error \
--set miner.client.poll_interval=1001 \
--set ckb.logger.color=maybe
What I see
The command fails. The error message is:
Boolean value must be one of: true/false/yes/no/1/0.
This tells me which values are allowed, but neither ckb.logger.color nor maybe appears in the message. I have to look through the command myself to find the setting it refers to.
What I would like to see
Please include the setting name and the value that was rejected. For example:
Invalid value 'maybe' for 'ckb.logger.color'. Use true/false/yes/no/1/0.
That would let me go straight to the setting I need to correct.
Severity and impact
I would consider this a low-severity usability issue. The main impact is the extra effort needed to find a mistake, particularly for users unfamiliar with the settings or when changing several at once.
In this reproduction, the original configuration and chain data remained unchanged; none of the settings in the failed command were saved. I did not observe data loss or a partially applied update.
The workaround is to check the supplied settings, correct the invalid value, and run the command again. A clearer message would make that step easier, but this does not appear to need an urgent fix.
What happened
When I tried updating several devnet settings in one command, I noticed that an invalid value produced an error that only listed the allowed values. It did not tell me which setting I needed to fix.
It would be helpful if the message included the setting name and the value I entered, especially when changing several settings at once.
Environment
0.4.13, installed from npm and confirmed withoffckb --version.0.207.0.Steps to reproduce
Use a disposable devnet that has been initialized and stopped. If needed, start and stop it first, replacing
/path/to/ckbwith your local CKB executable:Try updating these three settings. The last one deliberately uses
maybefor whether logs should use color; this setting expects a value such astrueorfalse:What I see
The command fails. The error message is:
This tells me which values are allowed, but neither
ckb.logger.colornormaybeappears in the message. I have to look through the command myself to find the setting it refers to.What I would like to see
Please include the setting name and the value that was rejected. For example:
That would let me go straight to the setting I need to correct.
Severity and impact
I would consider this a low-severity usability issue. The main impact is the extra effort needed to find a mistake, particularly for users unfamiliar with the settings or when changing several at once.
In this reproduction, the original configuration and chain data remained unchanged; none of the settings in the failed command were saved. I did not observe data loss or a partially applied update.
The workaround is to check the supplied settings, correct the invalid value, and run the command again. A clearer message would make that step easier, but this does not appear to need an urgent fix.