Loading...
Loading...
Handle iii engine and SDK errors across Node, Python, Rust, and browser workers. Use when interpreting error codes, retryability, RBAC denial, timeouts, handler failures, or SDK-specific exception surfaces.
npx skill4agent add iii-hq/iii iii-error-handlingcode| Code | Emitted by | Meaning | Typical handling |
|---|---|---|---|
| Engine and SDK local dispatch | No registered function is available under that ID | Check function ID, worker install/startup, discovery, and trigger type hints |
| Engine invocation/router path | Engine failed to route, remember, or complete the invocation | Inspect engine logs, protocol state, and worker connectivity |
| Engine invocation handler | Invocation was cancelled or stopped by the engine/runtime | Treat as failed work; decide whether caller should retry |
| RBAC / worker-gated engine functions | RBAC denied the action | Do not retry blindly; inspect policy, auth context, and allowed functions |
| Engine/worker wire error when a worker reports lowercase timeout | Invocation exceeded a timeout reported through the wire protocol | Treat as timeout, but do not assume every SDK maps it to a timeout subclass |
| SDK local dispatch | Registration exists but cannot be invoked as a normal local function | Inspect registration/invocation type |
| SDK worker handler wrappers | Local worker handler, HTTP-invoked function wrapper, or SDK-side handler path failed | Inspect handler logs, stacktrace, and payload validation |
| Node/Python SDK caller timeout | Client waited longer than | Increase timeout only if the workload is expected to run long; otherwise optimize or enqueue |
timeoutTIMEOUTFORBIDDENfunction_not_foundTriggerAction.Enqueue({ queue })import { IIIInvocationError } from 'iii-sdk'
try {
await iii.trigger({ function_id: 'orders::charge', payload })
} catch (error) {
if (error instanceof IIIInvocationError && error.code === 'FORBIDDEN') {
throw new Error('Policy denied orders::charge')
}
throw error
}from iii import IIIForbiddenError, IIIInvocationError, IIITimeoutError
try:
result = iii.trigger({"function_id": "orders::charge", "payload": payload})
except IIIForbiddenError:
raise RuntimeError("Policy denied orders::charge")
except IIITimeoutError:
raise RuntimeError("orders::charge timed out")
except IIIInvocationError as exc:
if exc.code == "timeout":
raise RuntimeError("orders::charge timed out")
raise RuntimeError(f"{exc.code}: {exc.message}")match iii.trigger(request).await {
Ok(value) => value,
Err(iii_sdk::IIIError::Timeout) => {
return Err("orders::charge timed out".into());
}
Err(iii_sdk::IIIError::Remote { code, message, .. }) if code == "FORBIDDEN" => {
return Err(format!("policy denied: {message}").into());
}
Err(err) => return Err(err.into()),
}iii-worker-rbaciii-trigger-actionsiii-observability