@nxtedition/lib 17.1.0 → 17.1.1
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 +11 -5
- package/package.json +1 -1
package/errors.js
CHANGED
|
@@ -83,11 +83,13 @@ export function serializeError(error) {
|
|
|
83
83
|
message = msg,
|
|
84
84
|
errors,
|
|
85
85
|
code,
|
|
86
|
+
exitCode = code,
|
|
86
87
|
signal,
|
|
88
|
+
signalCode = signal,
|
|
87
89
|
cause,
|
|
88
90
|
body,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
status,
|
|
92
|
+
statusCode = status,
|
|
91
93
|
headers,
|
|
92
94
|
...properties
|
|
93
95
|
} = error
|
|
@@ -96,6 +98,10 @@ export function serializeError(error) {
|
|
|
96
98
|
signal = SIGNALS[signal] ?? signal
|
|
97
99
|
}
|
|
98
100
|
|
|
101
|
+
if (typeof signalCode === 'number') {
|
|
102
|
+
signalCode = SIGNALS[signalCode] ?? signalCode
|
|
103
|
+
}
|
|
104
|
+
|
|
99
105
|
errors = Array.isArray(errors) ? errors.map(serializeError) : undefined
|
|
100
106
|
cause = cause ? serializeError(cause) : undefined
|
|
101
107
|
|
|
@@ -106,9 +112,9 @@ export function serializeError(error) {
|
|
|
106
112
|
...properties,
|
|
107
113
|
message,
|
|
108
114
|
type,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
115
|
+
exitCode,
|
|
116
|
+
signalCode,
|
|
117
|
+
statusCode,
|
|
112
118
|
headers,
|
|
113
119
|
data,
|
|
114
120
|
cause,
|