mozilla/node-convict

Improve .defaut() and .reset() errors for users

A-312 opened this issue · 1 comments

A-312 commented
myOwnConfig.default('foo.no')
// throw: cannot find configuration param 'foo.properties.no.default'
myOwnConfig.reset('foo.no')
// throw: cannot find configuration param 'foo.properties.no.default'
myOwnConfig.get('foo.no')
// throw: cannot find configuration param 'foo.no'

We should replace :

cannot find configuration param 'foo.properties.no.default'

by :

cannot find default value for 'foo.no'

A-312 commented

Or with the same behavior of other error:

foo.no: connot find default property

or:

foo.no: default property is missing in the schema.