| Code | Meaning | Expected behavior |
|---|---|---|
INVALID_REQUEST | The request is invalid (e.g. it tried to write a key that is not declared in the settings schema) | Fix the payload; write only setting keys declared in the schema |
CAPABILITY_DENIED | No permission | Do not try a hidden fallback |
CONTEXT_EXPIRED | The binding is invalid | Drop the operation |
PAYLOAD_TOO_LARGE | The byte limit was exceeded | Shrink the payload |
RATE_LIMITED | The quota is exhausted | Use bounded backoff |
TIMEOUT | The operation did not complete | Do not assume success |
NOT_AVAILABLE | The adapter is not ready | Show a plain status |
UNKNOWN_METHOD | An unknown host-RPC was called | Check the method name/SDK version |
VERSION_INCOMPATIBLE | Versions do not match | Do not run the plugin |
PLUGIN_DISABLED | The session was closed | Do not send requests |
INTERNAL_HOST_ERROR | The host operation could not complete | Do not log internal details |
try {
await client.setTitle(contextId, title);
} catch (error) {
if (error?.code === 'CONTEXT_EXPIRED' || error?.code === 'PLUGIN_DISABLED') return;
if (error?.code === 'RATE_LIMITED' || error?.code === 'TIMEOUT') return;
throw error;
}
