Skip to main content

Module error

Module error 

Source
Expand description

Error types for kopia subprocess invocation and JSON parsing.

A terminal KopiaError must carry enough structured detail for the mover to build a status.failure block (ADR §4.10): exit code, the last lines of stderr, and a best-effort error class derived from kopia’s stderr so the controller can decide whether a retry is worthwhile.

Enums§

KopiaError
Errors produced while invoking kopia or parsing its --json output.
KopiaErrorClass
A best-effort classification of a kopia failure, derived by inspecting the captured stderr. This is intentionally coarse — it exists to drive the “should we retry?” decision in the mover, not to be exhaustive. Unknown failures map to KopiaErrorClass::Unknown and are treated as non-retryable by default.

Constants§

STDERR_TAIL_LINES
How many trailing lines of stderr we retain on a failed invocation. Kopia can print a lot of progress to stderr; the tail is where the actual error message lands.

Functions§

notfound_is_uninitialized
Whether a KopiaErrorClass::NotFound connect failure is the backend reporting a genuinely uninitialized repository (kopia’s ErrRepositoryNotInitialized: “repository not initialized in the provided storage”) rather than a missing path / mount (“no such file or directory”, “does not exist”).