pub enum Error {
NotFound,
Invalid,
Conflict,
Db(Error),
Unavailable(String),
Other(String),
}Expand description
Errors returned by videre-api operations. Each consumer maps these to its own convention (axum -> StatusCode, other embedders -> their own error type).
Variants§
NotFound
The target row/label does not exist.
Invalid
Caller-supplied input was rejected (e.g. an empty label after sanitizing).
Conflict
The thing being mutated changed underneath the caller (stale question, moved face, different active profile). Retry with fresh state.
Db(Error)
Underlying database failure.
The library is momentarily unavailable: its root no longer names the library the server bound to, or exclusive maintenance holds it. Distinct from a permanent failure so the caller can map it to a retryable status (503) rather than a 500.
Other(String)
Any other failure surfaced as a plain message (e.g. from videre-core functions that return anyhow::Error, like pipeline_runs).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()