@nxtedition/lib 17.2.11 → 17.2.12
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 +3 -2
- package/package.json +1 -1
package/errors.js
CHANGED
|
@@ -83,7 +83,7 @@ export function serializeError(error) {
|
|
|
83
83
|
message = msg,
|
|
84
84
|
errors,
|
|
85
85
|
code,
|
|
86
|
-
exitCode = code,
|
|
86
|
+
exitCode = /^([A-Z]+|[a-z]+|[0-9]+)$/.test(code) ? code : null,
|
|
87
87
|
signal,
|
|
88
88
|
signalCode = signal,
|
|
89
89
|
cause,
|
|
@@ -112,6 +112,7 @@ export function serializeError(error) {
|
|
|
112
112
|
...properties,
|
|
113
113
|
message,
|
|
114
114
|
type,
|
|
115
|
+
code,
|
|
115
116
|
exitCode,
|
|
116
117
|
signalCode,
|
|
117
118
|
statusCode,
|
|
@@ -180,7 +181,7 @@ export function makeMessages(error, options) {
|
|
|
180
181
|
} else {
|
|
181
182
|
err = {
|
|
182
183
|
msg: 'Unknown Error',
|
|
183
|
-
|
|
184
|
+
title: 'UnknownError',
|
|
184
185
|
id: 'unknown_error',
|
|
185
186
|
level: 50,
|
|
186
187
|
code: 'NXT_UNKNOWN_ERROR',
|