@nxtedition/lib 19.0.24 → 19.0.25

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.
Files changed (2) hide show
  1. package/errors.js +5 -1
  2. package/package.json +1 -1
package/errors.js CHANGED
@@ -67,7 +67,11 @@ export function serializeError(error) {
67
67
  error[kSeen] = undefined
68
68
 
69
69
  const type =
70
- toString.call(error.constructor) === '[object Function]' ? error.constructor.name : error.name
70
+ typeof error?.type === 'string'
71
+ ? error.type
72
+ : toString.call(error.constructor) === '[object Function]'
73
+ ? error.constructor.name
74
+ : error.name
71
75
 
72
76
  let data = error.data || error.body
73
77
  if (typeof data === 'string') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "19.0.24",
3
+ "version": "19.0.25",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",