Reconstruct an Error from a SerializedError. The reconstructed Error has
the same name, message, stack, and cause chain as the original,
but its prototype is always Error.prototype — subclass identity does
not round-trip.
A string is accepted as a shorthand for {name: "Error", message: <string>},
matching what serializeCause emits when a cause was a bare string.
Reconstruct an Error from a SerializedError. The reconstructed Error has the same
name,message,stack, andcausechain as the original, but its prototype is alwaysError.prototype— subclass identity does not round-trip.A
stringis accepted as a shorthand for{name: "Error", message: <string>}, matching whatserializeCauseemits when acausewas a bare string.