Skip to content

Transport And Error

Status: Running today. The SDK transport contract and the SDK error projection contract are shipped under sdk/kernel/transport-contract.md + sdk/kernel/error-projection.md.

The SDK Transport And Error surface covers how the SDK talks to runtime over admitted transports + how runtime errors project into typed SDK errors that apps can handle predictably.

Transport

ConcernAuthority
Transport bindingssdk/kernel/transport-contract.md
Connection lifecyclePer admitted transport
Reconnect strategyTransport-level only (does NOT rescue contract failure)

Transports admitted in the contract govern how SDK calls reach runtime. The transport layer is responsible for bytes; it is not responsible for "fixing" contract-level errors.

Error Projection

ConcernAuthority
Error projection from runtime to SDKsdk/kernel/error-projection.md
Reason code surfacingTyped; never silently dropped
Decode / content-type / schema failuresSurface as typed SDK errors; not retried
Auth / transport failuresSurface as typed SDK errors; may retry per transport policy

The boundary: retry / auth refresh are transport / auth mechanisms only. They do not rescue decode, content-type, schema, or contract failures. A schema-invalid response does not become valid by retrying.

Reader Scenario: A Schema-Invalid Response

Runtime returns a response that fails schema validation at the SDK.

  1. SDK projects error. Typed SDK error with schema-failure reason code.
  2. No silent retry. Transport may retry transport failures; this is not one.
  3. App handles the typed error. Surfaces user-visible reason without pretending success.

Reader Scenario: A Transport Disconnect

Runtime daemon enters STOPPING; SDK transport disconnects.

  1. SDK detects. Per S-RUNTIME-028 runtime.disconnected or gRPC status.
  2. Transport reconnect strategy. Per admitted transport policy.
  3. App receives typed transport error. App decides whether to retry the call after reconnect.
  4. No spoof success. Transport disconnect does not silently produce a faked response.

What Transport And Error Do Not Do

  • They do not rescue schema / content-type / decode / contract failures via retry.
  • They do not silently drop reason codes.
  • They do not let auth refresh substitute for fixing a schema error.

Source Basis

Nimi AI open world platform documentation.