Expand description
Stable IPC error code constants.
Every RuntimeResponse::Error / RuntimeResponseV2::Error code field
produced by the runtime is one of the constants in this module. The codes
are frozen for the entire 1.x cycle: existing codes are never renamed, and
new codes may only be added (additive).
The runtime constructs error responses exclusively from these constants. Hosts and clients may switch on the string values; the constants are exported so that downstream Rust code does not have to inline string literals.
Constants§
- FROZEN_
CODES - All frozen error codes in alphabetical order.
- HANDLER_
INTERNAL_ ERROR - Handler reported an internal error (covers all four WIT
handler-errorvariants on the wire for backwards compatibility). - HANDLER_
INVALID_ OUTPUT - Handler output was not valid JSON.
- HANDLER_
OUTPUT_ TOO_ LARGE - Handler output exceeded the host-side size limit.
- HANDLER_
TIMEOUT - Handler exceeded the wall-clock deadline. Retryable.
- HANDLER_
TRAP - Handler trapped (unreachable, out-of-bounds, stack overflow, …).
- INCOMPATIBLE_
API_ VERSION apiVersionwas outside[MIN_RUNTIME_API_VERSION, RUNTIME_API_VERSION].- INVALID_
CLIENT_ IDENTITY clientName/clientVersionfailed length or emptiness checks.- INVALID_
JSON - Request body was not valid protocol JSON.
- INVALID_
REQUEST_ ID requestIdwas missing, empty, or longer than 128 characters.- NO_
INVOKE_ HANDLER Invokewas issued but no handler is registered.- UNSUPPORTED_
CAPABILITY Invokecapability is not in the effective capability set.
Functions§
- is_
frozen - Returns
trueifcodeis one of the frozen 1.x error codes.