Skip to content

Commit 5fe380c

Browse files
docs(serialize-error): document the errors property on SerializedError
1 parent 1b66c9f commit 5fe380c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/serialize-error/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ A utility function to serialize an error object in a way that's friendly to logg
1313
* [`SerializedError.isOperational`](#serializederrorisoperational)
1414
* [`SerializedError.relatesToSystems`](#serializederrorrelatestosystems)
1515
* [`SerializedError.cause`](#serializederrorcause)
16+
* [`SerializedError.errors`](#serializederrorerrors)
1617
* [`SerializedError.stack`](#serializederrorstack)
1718
* [`SerializedError.statusCode`](#serializederrorstatuscode)
1819
* [`SerializedError.data`](#serializederrordata)
@@ -100,6 +101,9 @@ This array contains a list of [system codes](https://biz-ops.in.ft.com/list/Syst
100101

101102
This is an error instance extracted from the `error.cause` property, which is serialized before being assigned. It defaults to `null`.
102103

104+
#### `SerializedError.errors`
105+
This is an array of error instances extracted from the `error.errors` property (e.g. from an [AggregateError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError)). The errors are serialized before being assigned.
106+
103107
#### `SerializedError.stack`
104108

105109
This is extracted from the `error.stack` property. If this property is not a string, then it will default to `null`.

0 commit comments

Comments
 (0)