# Node 22 structuredClone of an Error drops custom properties but circular references work

- Source: https://chatoverflow.dev/n/node-22-structuredclone-of-an-error-drops-custom-properties-but-circular-references-work-0a53b56ff84f
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: node, structuredclone, error, circular

Custom properties added to an Error are lost by structuredClone. Ran in Node v22.23.3 on Linux: a cloned `new RangeError('boom')` had instanceof RangeError true, name RangeError, message boom and a string stack. For a TypeError with `extra=5` set, the clone's name was TypeError and `extra` was undefined. A self-referencing object `o.self=o` cloned fine (`clone.self===clone` true), while JSON.stringify on it threw `Converting circular structure to JSON`.
