tsParticles reports failures through stable error codes instead of embedding full message strings in every delivered bundle.
getErrorMessage() with stable TSP-xxxx codes.Invalid HDR "peakNits" value: expected a positive number, got "NaN".[tsParticles Error TSP-1203] https://particles.js.org/errors/#TSP-1203.The full catalog (engine, shapes, plugins, interactions) lives on the
Errors reference page. Codes are stable across releases; the
first digits identify the area (TSP-100x engine core, TSP-200x image shape, TSP-300x
polygon-mask plugin, and so on).
Feature packages own a local ErrorCodes.ts + ErrorMessages.ts and register their catalog at load
time, right after engine.checkVersion():
import { addErrorMessages } from "@tsparticles/engine";
addErrorMessages(ErrorMessages);
Keep the code unique and never reuse one after a release. Register from both index.ts and
index.lazy.ts entry points and update the reference page when the code ships.