Error codes#

Every error the SignalX runtime throws carries a unique code, SIGX001 through SIGX999. Production builds print that code with a link back to this reference:

SIGX101 "#app" — see https://sigx.dev/errors/SIGX101/

Follow the link for the code you hit, or find it in the table below.

Dev builds vs production builds#

The two builds report the same error differently, and each is tuned for where you read it.

Development gives you the full message plus a suggestion naming the fix:

Mount target "#app" not found.

Production gives you the code, the runtime detail, and this URL. The human-readable messages and suggestions are stripped — they sit behind a compile-time __DEV__ branch that folds away during the build, so those strings never reach your production bundle. That is what keeps the runtime small, and it is why this page exists: in production the link is the message.

Handling errors in code#

Every runtime error is a SigxError, so you can branch on code rather than matching message text:

TypeScript
import { SigxError } from 'sigx';

try {
    app.mount('#app');
} catch (e) {
    if (e instanceof SigxError && e.code === 'SIGX101') {
        // the mount target isn't in the document yet
    }
}
PropertyTypeNotes
codestringThe SIGX### code — stable across dev and production
messagestringFull text in dev; code + detail + docs link in production
suggestionstring | undefinedThe fix hint. Dev builds only
causeError | undefinedThe underlying error, when there is one
namestringAlways 'SigxError'

code is the only field worth branching on. Treat message and suggestion as diagnostics for humans, not as a contract.

Every code#

Codes are grouped into ranges by subsystem, so the number alone tells you roughly where to look.

App lifecycle · 001–099#

CodeMeaning
SIGX001No mount function provided and no default set

Rendering & mounting · 100–199#

CodeMeaning
SIGX100Render target not found
SIGX101Mount target not found
SIGX102Async setup is SSR-only
SIGX103errorScope() called outside setup

Dependency injection · 200–299#

CodeMeaning
SIGX200defineProvide called outside setup
SIGX201defineProvide called with something that isn't an injectable
SIGX202A required injectable was never provided
SIGX203defineFactory setup returned a primitive

Hooks & async · 300–399#

CodeMeaning
SIGX300A hook was called outside setup

Messaging · 400–499#

CodeMeaning
SIGX400Subscribed to a destroyed topic
SIGX401Created a topic on a destroyed group