Skip to Content

RPC error codes

RpcErrorDetail includes:

FieldMeaning
messageHuman-readable explanation.
stackStack trace when available (often null on validation errors).
layer'validation', 'expected', or 'unexpected'.
codeMachine-readable string; mirrors the response label when not overridden.

On error responses, RpcResponse.status is 'error', result is null, returnType is 'error', returnShape is null, and label identifies the failure class.

Common code / label values

Code / labelWhen
INVALID_FN_KEYfnKey missing . separator.
FN_NOT_FOUNDKey not present in registry (message lists available keys).
WRONG_ARG_COUNTargs.length ≠ declared params length.
INPUT_SCHEMA_INVALIDParams JSON Schema validation failed (layer: validation).
RETURN_SCHEMA_INVALIDReturn JSON Schema validation failed after invoke.
HTTP_BRIDGE_NOT_CONFIGUREDinvokeKind is http_synthetic but no bridge spec exists.
NOT_A_FUNCTIONCallable missing on class or function entry.
NO_INSTANCEClass entry without resolvable instance / method.
INVOKE_TIMEOUTHandler exceeded configured timeout.
RESULT_NOT_SERIALIZABLESerialization rejected the result value.
RATE_LIMITEDToken bucket rejected invoke (transports).
UPLOAD_MATERIALIZE_FAILEDFile placeholder could not be resolved to bytes (transports).
UNEXPECTED_ERRORUncaught exception path (often layer: unexpected).

Socket.IO transport (attachCatRPC)

These come from attachCatRPC (sdk/ts/src/transport/socket-io-playground.ts), not from executeRPC alone.

Code / labelWhen
UNAUTHENTICATEDsecretApiKey is set on attachCatRPC and isDevelopment is false (production). A registerPreInvoke hook rejects every rpc:call before invoke. Message: Pipeline is cannot be invoked in production mode. error.layer is validation. Use isDevelopment: true (or omit secretApiKey in prod) if the QA pipeline must invoke RPC in that environment.
INVALID_PAYLOADMalformed rpc:call body (not an object, or missing requestId / fnKey).
KIND_MISMATCHkind: 'service' used for a non-service entry (or the converse for express playground).

Hooks such as registerPreInvoke may return a custom RpcResponse with their own label / error.code.

Strict clients should tolerate unknown code strings and treat them as generic failures.

See also