asobi_lua_game_error (asobi v0.84.0)
View SourceEmits the public [asobi, error] game-error telemetry for a failed Lua callback,
and provides the bounded error-rendering helpers shared by the log and dev-error
paths.
Only bounded, PII-free context crosses the telemetry boundary (which fans out to
whatever handlers an operator attached): the callback name, the script basename
(never a path), and a classified reason. The raw error reason - which can embed
player input via Lua error()/assert() - is deliberately NOT included; callers
that want a human-readable rendering use format_reason/1, which is length-capped
for the same reason.
Summary
Functions
Cap a binary at the shared 500-char rendering budget; non-binaries become <<"<unprintable>">>.
Emit [asobi, error] for a failed Lua callback; only bounded, PII-free context crosses the boundary.
Human-readable, length-capped rendering of a callback error reason.
Classify a callback error reason for telemetry and logs.
Basename of a script path, <<"<unknown>">> for anything unexpected. Never a full path.
Functions
Cap a binary at the shared 500-char rendering budget; non-binaries become <<"<unprintable>">>.
Emit [asobi, error] for a failed Lua callback; only bounded, PII-free context crosses the boundary.
Human-readable, length-capped rendering of a callback error reason.
The reason can embed player input (Lua error()/assert() values), so
every rendering is bounded before it reaches a log line or a dev-mode
client message - an attacker feeding oversized input into a failing
callback must not get an unbounded write amplifier.
Classify a callback error reason for telemetry and logs.
Basename of a script path, <<"<unknown>">> for anything unexpected. Never a full path.