pub enum WaypointError {
Show 35 variants
ConfigError(String),
DatabaseError(Error),
MigrationParseError(String),
ChecksumMismatch {
script: String,
expected: i32,
found: i32,
},
ValidationFailed(String),
MigrationFailed {
script: String,
reason: String,
},
LockError(String),
CleanDisabled,
BaselineExists,
IoError(Error),
OutOfOrder {
version: String,
highest: String,
},
PlaceholderNotFound {
key: String,
available: String,
},
HookFailed {
phase: String,
script: String,
reason: String,
},
UpdateError(String),
UndoFailed {
script: String,
reason: String,
},
UndoMissing {
version: String,
},
LintFailed {
error_count: usize,
details: String,
},
DiffFailed {
reason: String,
},
DriftDetected {
count: usize,
details: String,
},
SnapshotError {
reason: String,
},
DependencyCycle {
path: String,
},
MissingDependency {
version: String,
dependency: String,
},
InvalidDirective {
script: String,
reason: String,
},
GitError(String),
ConflictsDetected {
count: usize,
details: String,
},
DatabaseNotFound {
name: String,
available: String,
},
MultiDbDependencyCycle {
path: String,
},
MultiDbError {
name: String,
reason: String,
},
PreflightFailed {
checks: String,
},
GuardFailed {
kind: String,
script: String,
expression: String,
},
MigrationBlocked {
script: String,
reason: String,
},
AdvisorError(String),
SimulationFailed {
reason: String,
},
NonTransactionalStatement {
script: String,
statement: String,
},
ConnectionLost {
operation: String,
detail: String,
},
}Expand description
All error types that Waypoint operations can produce.
Variants§
ConfigError(String)
Invalid or missing configuration (TOML parse errors, missing required fields, etc.).
DatabaseError(Error)
A database query or connection operation failed (PostgreSQL).
MigrationParseError(String)
A migration filename could not be parsed into a valid migration.
ChecksumMismatch
Never produced — checksum mismatches surface as ValidationFailed. Will be removed in 0.4.0.
Reserved / unused. No code path currently constructs this variant —
checksum mismatches surface as ValidationFailed(String) from the
validate command (which aggregates one or more mismatches into a
single human-readable string). Kept for back-compat with external
matchers; scheduled for removal in 0.4.0.
Fields
script: StringNever produced — checksum mismatches surface as ValidationFailed. Will be removed in 0.4.0.
ValidationFailed(String)
One or more validation checks failed before migration could proceed.
MigrationFailed
A migration script failed to execute against the database.
LockError(String)
Could not acquire the PostgreSQL advisory lock used to prevent concurrent migrations.
CleanDisabled
The clean command was invoked but clean is not enabled in the configuration.
BaselineExists
A baseline was requested but the schema history table already contains entries.
IoError(Error)
A filesystem I/O operation failed (reading migration files, config, etc.).
OutOfOrder
A migration version is lower than the highest applied version and out-of-order is disabled.
PlaceholderNotFound
A ${key} placeholder in migration SQL has no corresponding value defined.
HookFailed
A SQL callback hook script failed during execution.
UpdateError(String)
The self-update mechanism encountered an error.
UndoFailed
An undo migration script failed to execute against the database.
UndoMissing
No undo migration file was found for the requested version.
LintFailed
Lint analysis found one or more errors in migration SQL.
DiffFailed
Never produced — diff failures surface as ConfigError or DatabaseError. Will be removed in 0.4.0.
Reserved / unused. No code path currently constructs this variant —
the diff command surfaces failures as ConfigError(String) or
DatabaseError. Kept for back-compat with external matchers; scheduled
for removal in 0.4.0.
Fields
DriftDetected
The live database schema differs from the expected snapshot.
SnapshotError
A schema snapshot operation (save, load, or compare) failed.
DependencyCycle
A circular dependency was detected among migration @depends directives.
MissingDependency
A migration declares a dependency on a version that does not exist on disk.
InvalidDirective
A migration directive comment is malformed or contains invalid values.
GitError(String)
A Git operation required for branch conflict detection failed.
ConflictsDetected
Multiple branches introduced conflicting migration versions.
DatabaseNotFound
A named database referenced in multi-database config was not found.
MultiDbDependencyCycle
A circular dependency was detected among multi-database depends_on declarations.
MultiDbError
A multi-database migration operation failed for a specific named database.
PreflightFailed
One or more pre-flight safety checks failed before migration could proceed.
GuardFailed
A guard precondition or postcondition check failed.
MigrationBlocked
A migration was blocked by a DANGER safety verdict.
AdvisorError(String)
A schema advisor analysis encountered an error.
SimulationFailed
A migration simulation failed.
NonTransactionalStatement
A migration contains statements that cannot run inside a transaction (e.g. CONCURRENTLY).
ConnectionLost
The database connection was lost during an operation.
Trait Implementations§
Source§impl Debug for WaypointError
impl Debug for WaypointError
Source§impl Display for WaypointError
impl Display for WaypointError
Source§impl Error for WaypointError
impl Error for WaypointError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()