Passing `trace` for `runtime-log-level` leads to cryptic error message
Closed this issue · 2 comments
bkchr commented
ZodError: [
{
"code": "invalid_type",
"expected": "number",
"received": "nan",
"path": [
"runtime-log-level"
],
"message": "Expected number, received nan"
}
]
at get error [as error] (/home/bastian/.npm/_npx/81ad9c881cb83600/node_modules/zod/lib/types.js:55:31)
at ZodObject.parse (/home/bastian/.npm/_npx/81ad9c881cb83600/node_modules/zod/lib/types.js:160:22)
at Object.handler (/home/bastian/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks/dist/cjs/plugins/run-block/cli.js:32:35)
at /home/bastian/.npm/_npx/81ad9c881cb83600/node_modules/yargs/build/index.cjs:1:8993
at /home/bastian/.npm/_npx/81ad9c881cb83600/node_modules/yargs/build/index.cjs:1:4949
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
issues: [
{
code: 'invalid_type',
expected: 'number',
received: 'nan',
path: [Array],
message: 'Expected number, received nan'
}
],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
code: 'invalid_type',
expected: 'number',
received: 'nan',
path: [Array],
message: 'Expected number, received nan'
}
]
}
Would be better to have a more human friendly error message if possible.
bkchr commented
Sorry for the late reply, looks good! :)