canic-cli 0.92.0

Operator CLI for Canic fleet setup, builds, evidence, catalog, backup, and restore workflows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Module: backup::create::executor::errors
//!
//! Responsibility: map ICP and preflight errors for backup execution.
//! Does not own: command execution or receipt construction.
//! Boundary: error translation into backup command and runner errors.

use canic_backup::runner::BackupRunnerCommandError;
use canic_host::icp::IcpCommandError;

pub(super) fn preflight_error(error: impl std::error::Error) -> BackupRunnerCommandError {
    BackupRunnerCommandError::failed("preflight", error.to_string())
}

pub(super) fn runner_icp_error(error: IcpCommandError) -> BackupRunnerCommandError {
    BackupRunnerCommandError::failed("icp", error.to_string())
}