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§
- Kopia
Error - Errors produced while invoking kopia or parsing its
--jsonoutput. - Kopia
Error Class - 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::Unknownand 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::NotFoundconnect failure is the backend reporting a genuinely uninitialized repository (kopia’sErrRepositoryNotInitialized: “repository not initialized in the provided storage”) rather than a missing path / mount (“no such file or directory”, “does not exist”).