@nxtedition/lib 14.0.26 → 14.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/errors.js +2 -2
- package/package.json +1 -1
package/errors.js
CHANGED
|
@@ -122,9 +122,9 @@ module.exports.makeMessages = function makeMessages(error, options) {
|
|
|
122
122
|
} else if (error) {
|
|
123
123
|
let err
|
|
124
124
|
if (typeof error === 'string' && error) {
|
|
125
|
-
err = { msg: error, id: options?.id, level: options?.level ||
|
|
125
|
+
err = { msg: error, id: options?.id, level: options?.level || 50, code: options?.code }
|
|
126
126
|
} else if (typeof error === 'object') {
|
|
127
|
-
const level = parseInt(error.level) || options?.level ||
|
|
127
|
+
const level = parseInt(error.level) || options?.level || 50
|
|
128
128
|
const code =
|
|
129
129
|
[error?.code, options?.codes?.[error?.code]].find(
|
|
130
130
|
(x) => typeof x === 'string' && x.length > 0
|