Skip to main content

Module error

Module error 

Source
Expand description

One error type, two granularities.

§Why two

The daemon reports distinct statuses such as Conflict, NotFound, and ProtocolError. The CLI groups them into a coarse process exit category while retaining the finer wire kind in its JSON envelope.

Error::kind answers the exit-category question; Error::wire_kind answers which daemon condition occurred. The conformance suite checks both contracts.

§What a caller matches on

ErrorKind, nearly always. WireKind exists for the two consumers that need the finer view: the conformance driver, and a caller retrying a specific daemon condition. Nobody should parse a message.

Structs§

Error
A failure, classified once at the point it is raised.

Enums§

ErrorKind
The coarse failure classes, one per non-zero row of the CLI’s exit table.
WireKind
The fine-grained taxonomy: one variant per condition the daemon or the transport distinguishes.