Errors

Error codes in the protocol, and what fails closed or open.

An error response is {code, message, data?}. data.code is the stable name.

Numeric codes

The numeric codes are the JSON-RPC ones, and those of OxidePM's own range.

CodeMeaningName
-32700Parse error
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error
-32022Unsupported protocolE_ADAPTER_PROTOCOL
-32023Permission deniedE_POLICY_DENIED
-32024Cancelled
-32025TimeoutE_ADAPTER_TIMEOUT
-32026Shutting down
-32027Dry run unsupportedE_DRY_RUN_UNSUPPORTED
-32028Rate limitedE_RATE_LIMITED
-32029BusyE_ADAPTER_BUSY

The other stable names are listed under Error codes.

What fails closed

The operation does not happen:

  • The executable's SHA-256 differs from the one recorded at install: it is not started (E_ADAPTER_TAMPERED).
  • The handshake names another adapter or version, or no common protocol: the adapter is killed and marked failed.
  • A request to an adapter that is missing, failed or not ready fails with a named error. There is no silent fallback.
  • A frame that is not valid, too large or out of turn is never acted on.
  • The sandbox cannot be set up as the grant says: the adapter is not started.

What fails open

The daemon carries on:

  • Events to a service are dropped, and counted, when its queue is full or it is down.
  • An adapter that crashes, hangs, floods or breaks the protocol is killed and restarted with backoff. The apps the daemon supervises are not touched.
  • Unknown fields, unknown notifications and floods on standard error are ignored or dropped.

The daemon never stops, restarts, signals or changes an app because an adapter failed.