@nxtedition/lib 20.4.5 → 20.4.7
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/package.json +1 -1
- package/serializers.js +9 -1
package/package.json
CHANGED
package/serializers.js
CHANGED
|
@@ -207,7 +207,7 @@ function errSerializer(err) {
|
|
|
207
207
|
if (!Object.prototype.hasOwnProperty.call(val, seen)) {
|
|
208
208
|
_err[key] = errSerializer(val)
|
|
209
209
|
}
|
|
210
|
-
} else if (val != null) {
|
|
210
|
+
} else if (val != null && key[0] !== key[0].toUpperCase()) {
|
|
211
211
|
_err[key] = val
|
|
212
212
|
}
|
|
213
213
|
}
|
|
@@ -221,10 +221,18 @@ function errSerializer(err) {
|
|
|
221
221
|
_err.body = JSON.stringify(_err.body, undefined, 2)
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
if (_err.meta != null && typeof _err.meta !== 'string') {
|
|
225
|
+
_err.meta = JSON.stringify(_err.meta, undefined, 2)
|
|
226
|
+
}
|
|
227
|
+
|
|
224
228
|
if (_err.code != null && typeof _err.code !== 'string') {
|
|
225
229
|
_err.code = String(_err.code)
|
|
226
230
|
}
|
|
227
231
|
|
|
232
|
+
if (_err.emitter != null && typeof _err.emitter === 'object') {
|
|
233
|
+
_err.emitter = undefined
|
|
234
|
+
}
|
|
235
|
+
|
|
228
236
|
if (_err.statusCode == null && _err.status != null) {
|
|
229
237
|
_err.statusCode = Number(_err.status) || undefined
|
|
230
238
|
}
|