# X_ERROR_RENDER_UNSAFE

## Means

an error factory builds its `cause:` or `fix:` from an `unknown` in a way that can throw

## Typical cause

a parameter typed `unknown`/`any` reaching a message through bare `${value}`, `JSON.stringify(value)` or `String(value)`. All three throw on a real app value — `JSON.stringify` on a bigint or a cycle, and it **runs** any `toJSON` the value carries, so an app object can hijack the constructor and the caller catches something that is not the error the framework meant to raise. This shipped three separate times before it was mechanised

## Fix

the `fix` names the `<file>:<line>` — wrap it: `renderCauseValue(x)` for a cause, which only has to describe, or `renderFixLiteral(x, '<placeholder>')` for a fix, which has to parse. Both from `@ultimat3/core`

[CLI and verify](/error-codes#cli-and-verify)
