no-json-stringify-error
Avoid generic JSON serialization that can omit native Error details.
Why
Native Error details are non-enumerable, so generic JSON serialization discards diagnostic information.
Fix
Serialize explicit error fields or use an error-aware serializer.
Examples
try { f();} catch (err) { JSON.stringify({ error: err });}try { f();} catch (err) { JSON.stringify({ error: err instanceof Error ? err.message : String(err) });}