fix(xo-cli): fix invalid parameters error message
Introduced by d7f29e736
The error format has changed due to the switch of xo-server to Ajv.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
- @xen-orchestra/backups-cli major
|
||||
- @xen-orchestra/log minor
|
||||
- xo-cli patch
|
||||
- xo-web minor
|
||||
|
||||
<!--packages-end-->
|
||||
|
||||
@@ -273,7 +273,9 @@ async function main(args) {
|
||||
const lines = [error.message]
|
||||
const { errors } = error.data
|
||||
errors.forEach(error => {
|
||||
lines.push(` property ${error.property}: ${error.message}`)
|
||||
let { instancePath } = error
|
||||
instancePath = instancePath.length === 0 ? '@' : '@.' + instancePath
|
||||
lines.push(` property ${instancePath}: ${error.message}`)
|
||||
})
|
||||
throw lines.join('\n')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user