arcbox_migration/
error.rs1use std::path::PathBuf;
4
5pub type Result<T> = std::result::Result<T, MigrationError>;
7
8#[derive(Debug, thiserror::Error)]
10pub enum MigrationError {
11 #[error("migration source '{kind}' is unavailable at {path}")]
13 MissingSource {
14 kind: &'static str,
16 path: PathBuf,
18 },
19 #[error("unsupported migration source: {0}")]
21 UnsupportedSource(String),
22 #[error("unsupported resource for v1 migration: {0}")]
24 UnsupportedResource(String),
25 #[error("migration is blocked: {0}")]
27 Blocked(String),
28 #[error("invalid migration plan: {0}")]
30 InvalidPlan(String),
31 #[error("docker API error: {0}")]
33 Docker(String),
34 #[error(transparent)]
36 Io(#[from] std::io::Error),
37 #[error(transparent)]
39 SerdeJson(#[from] serde_json::Error),
40}