Skip to main content

WaypointError

Enum WaypointError 

Source
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.

§

MigrationParseError(String)

A migration filename could not be parsed into a valid migration.

§

ChecksumMismatch

The on-disk checksum of a migration does not match the recorded checksum.

Fields

§script: String
§expected: i32
§found: i32
§

ValidationFailed(String)

One or more validation checks failed before migration could proceed.

§

MigrationFailed

A migration script failed to execute against the database.

Fields

§script: String
§reason: String
§

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.

Fields

§version: String
§highest: String
§

PlaceholderNotFound

A ${key} placeholder in migration SQL has no corresponding value defined.

Fields

§available: String
§

HookFailed

A SQL callback hook script failed during execution.

Fields

§phase: String
§script: String
§reason: String
§

UpdateError(String)

The self-update mechanism encountered an error.

§

UndoFailed

An undo migration script failed to execute against the database.

Fields

§script: String
§reason: String
§

UndoMissing

No undo migration file was found for the requested version.

Fields

§version: String
§

LintFailed

Lint analysis found one or more errors in migration SQL.

Fields

§error_count: usize
§details: String
§

DiffFailed

A schema diff operation failed.

Fields

§reason: String
§

DriftDetected

The live database schema differs from the expected snapshot.

Fields

§count: usize
§details: String
§

SnapshotError

A schema snapshot operation (save, load, or compare) failed.

Fields

§reason: String
§

DependencyCycle

A circular dependency was detected among migration @depends directives.

Fields

§path: String
§

MissingDependency

A migration declares a dependency on a version that does not exist on disk.

Fields

§version: String
§dependency: String
§

InvalidDirective

A migration directive comment is malformed or contains invalid values.

Fields

§script: String
§reason: String
§

GitError(String)

A Git operation required for branch conflict detection failed.

§

ConflictsDetected

Multiple branches introduced conflicting migration versions.

Fields

§count: usize
§details: String
§

DatabaseNotFound

A named database referenced in multi-database config was not found.

Fields

§name: String
§available: String
§

MultiDbDependencyCycle

A circular dependency was detected among multi-database depends_on declarations.

Fields

§path: String
§

MultiDbError

A multi-database migration operation failed for a specific named database.

Fields

§name: String
§reason: String
§

PreflightFailed

One or more pre-flight safety checks failed before migration could proceed.

Fields

§checks: String
§

GuardFailed

A guard precondition or postcondition check failed.

Fields

§kind: String
§script: String
§expression: String
§

MigrationBlocked

A migration was blocked by a DANGER safety verdict.

Fields

§script: String
§reason: String
§

AdvisorError(String)

A schema advisor analysis encountered an error.

§

SimulationFailed

A migration simulation failed.

Fields

§reason: String
§

NonTransactionalStatement

A migration contains statements that cannot run inside a transaction (e.g. CONCURRENTLY).

Fields

§script: String
§statement: String
§

ConnectionLost

The database connection was lost during an operation.

Fields

§operation: String
§detail: String

Trait Implementations§

Source§

impl Debug for WaypointError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for WaypointError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for WaypointError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for WaypointError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for WaypointError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V