Skip to content

js-bao-wss-client


js-bao-wss-client / FunctionRunErrorCode

Type Alias: FunctionRunErrorCode ​

FunctionRunErrorCode = "FUNCTION_TIMEOUT" | "FUNCTION_NO_HANDLER" | "FUNCTION_THREW" | "OUTPUT_NOT_SERIALIZABLE" | "OUTPUT_TOO_LARGE" | "FUNCTION_INPUT_INVALID" | "FUNCTION_OUTPUT_INVALID" | "FUNCTION_DELETED" | "FUNCTION_RUNTIME_REFUSED" | "OUTPUT_SCHEMA_VIOLATION" | "ENGINE_ISOLATE_EVICTED" | "ENGINE_CODE_UPDATED" | "ENGINE_SLICE_DEADLINE" | "ENGINE_STORAGE_ERROR" | "ENGINE_INTERNAL_ERROR" | "ENGINE_INSTANCE_LOST"

Every code a function run can carry — the platform's closed set minus the two lock codes.

LOCK_CONTENTION and LOCK_TIMEOUT belong to a workflow's declarative lock, which a function never declares, so they are not in this union. The ENGINE_* members are failures that happened TO the run rather than in it: nothing in the function's own code caused one.

The declaration is the contract, not a filter: a value from a newer server reaches FunctionRunError.code and FunctionRun.errorCode unchanged, because dropping a code the platform wrote would be worse than reporting one this client has not heard of.

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30