Every error code, what it means, whether retrying helps — plus the codes that appear as warnings rather than errors.
Last updated
Every failure is a structured error: code (a stable machine code that does
not change between versions), message (a technical description), retryable
(whether retrying as-is is meaningful) and possibly details.
Branch on code, never parse message — the text may change.
When retryable is true, retrying as-is usually succeeds (waiting for a user
to confirm, a rate-limit window ending…). When false, change the parameters or
the environment first.
A machine-readable catalogue is exported from @printlink/types:
ERROR_CATALOG and errorCatalogEntry(code), always in step with this page.
import { PrintLinkClient, PrintLinkError, TransportError } from '@printlink/sdk';try { await client.connect(); await client.ensureAuthorized();} catch (err) { if (err instanceof PrintLinkError) { switch (err.code) { case 'PAIRING_PENDING': // normal: ask the user to accept, then retry break; case 'PAIRING_DENIED': // the user refused: explain and offer to retry break; case 'PERMISSION_DENIED': // missing permission: send them to the console break; default: console.warn(err.code, err.message, 'retryable =', err.retryable); } } else if (err instanceof TransportError) { // Transport: not running / wrong port / refused — guide install or check the port } else { throw err; }}
The new port cannot be bound (the old service keeps running)
No
PORT_MIGRATION_FAILED
Listener migration failed and was rolled back
No
LISTEN_SCOPE_BIND_FAILED
An address in the chosen scope cannot be bound
No
UNSAFE_CONFIG_REJECTED
The configuration violates a security floor
No
POLICY_LOCKED / POLICY_INVALID
Locked by machine policy / invalid policy file
No
DEVICE_NOT_FOUND / DEVICE_PAYLOAD_INVALID
No such raw device / payload validation failed
No
DEVICE_TRANSPORT_FAILED
Device transport failed
Yes
DEVICE_PROTOCOL_UNSUPPORTED
Device protocol unsupported
No
CONTENT_UNSUPPORTED / CONTENT_OPEN_FAILED
Content cannot be shown safely / opening failed
No
The two remote-fetch errors
A failed remote fetch is REMOTE_FETCH_DENIED (the target is not public or
violates a restriction) or REMOTE_FETCH_TOO_LARGE (the response is too large).
Messages contain only the source category, never the address or full URL.