Variable: BUILD_REFUSAL_VALUE_MAX_RENDERED
constBUILD_REFUSAL_VALUE_MAX_RENDERED:number
Hard ceiling, in characters, on the fragment renderCallerValue
returns: BUILD_REFUSAL_VALUE_MAX_LENGTH surviving characters, two
quotes, one ellipsis, and the (N characters) suffix at its widest.
renderCallerJson is held to the same ceiling and comes in two
characters under it, because JSON supplies its own quotes.
This is the bound on the FRAGMENT, not on the message. A refusal message
is this plus the site's own fixed template text, which differs per site, so
the message is bounded by a constant but not by this constant. Measured on
this tree: a 120,000-character control number gives an 86-character fragment
and a 150-character X12BuildError.message from buildInterchange. Do
not quote the ceiling as though it were a message length - an earlier
revision of the docs did exactly that, reporting "now 90 bytes" for a message
that is 150. The suite asserts the fragment against this constant and each
message against its own site.
Example
import { BUILD_REFUSAL_VALUE_MAX_RENDERED } from "@cosyte/x12";
BUILD_REFUSAL_VALUE_MAX_RENDERED; // 90