serializeError(value: unknown): SerializedError
Serializes any thrown value to a plain, serializable object.
An Error yields { name, message, stack?, cause?, classifiers?, errors? }
with the cause chain followed to a bounded depth. Safe scalar driver
classifiers are copied from a fixed allowlist; AggregateError members are
copied under bounded width and total-node budgets. A non-Error value (a
string, a number, a plain object) yields { name: 'Error', message: <stringified> } — the same shape, so a caller can always read name and
message without narrowing.
A plain, serializable representation