error.name, carried beside the error as an ordinary string. The
structured-clone algorithm serializes an Error's name only from the
built-in whitelist (Error, TypeError, RangeError, …) — a custom name
like ProviderUnavailableError reaches the page as "Error". A plain
property survives verbatim, so the page restores it before rejecting.
Absent from workers built before it existed; the page then sees the
clone-normalized name, exactly as it always did.
error.name, carried beside the error as an ordinary string. The structured-clone algorithm serializes an Error'snameonly from the built-in whitelist (Error, TypeError, RangeError, …) — a custom name likeProviderUnavailableErrorreaches the page as"Error". A plain property survives verbatim, so the page restores it before rejecting. Absent from workers built before it existed; the page then sees the clone-normalized name, exactly as it always did.