You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+74-2Lines changed: 74 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,84 @@ Serializes an `Error` like object. Returns an object:
16
16
raw:Error// Non-enumerable, i.e. will not be in the output, original
17
17
// Error object. This is available for subsequent serializers
18
18
// to use.
19
+
[...any additional Enumerable property the original Error had]
19
20
}
20
21
```
21
22
22
23
Any other extra properties, e.g. `statusCode`, that have been attached to the
23
24
object will also be present on the serialized object.
24
25
26
+
If the error object has a [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) property, the `cause`'s `message` and `stack` will be appended to the top-level `message` and `stack`. All other parameters that belong to the `error.cause` object will be omitted.
0 commit comments