pub enum Error {
Show 13 variants
Frontmatter(String),
InvalidRecord(String),
InvalidRemote(String),
Io(Error),
Json(Error),
Yaml(Error),
Other(String),
InvalidOrigin(String),
InvalidPath(String),
Http(Error),
NotFound {
project: String,
id: String,
},
NotSupported {
operation: String,
},
VersionMismatch {
current: String,
requested: String,
body: String,
},
}Expand description
All errors that can flow across crate boundaries.
Variants§
Frontmatter(String)
Frontmatter parsing or serialization failure.
InvalidRecord(String)
Record body / file format violation.
InvalidRemote(String)
Remote URL could not be parsed into a RemoteSpec.
Io(Error)
Underlying I/O error.
Json(Error)
JSON serialization error.
Yaml(Error)
YAML serialization error.
Other(String)
Untyped error escape hatch — only for cases where typing the error adds no value.
InvalidOrigin(String)
URL rejected by the egress allowlist (SG-01).
InvalidPath(String)
Path/filename rejected by the path validator (SG-04).
Http(Error)
Underlying HTTP/transport error from reqwest.
NotFound
The requested record does not exist on the backend.
Migrated from Error::Other(format!("not found: {context}")) —
see code-quality audit P1-1 (POLISH2-09 partial). Display string
retains the "not found:" prefix so existing substring-matching
callers (e.g. reposix-swarm’s ErrorKind::classify) continue to
classify correctly during the migration.
Fields
NotSupported
The backend received the request but does not support the operation
(e.g., a read-only connector being asked to update). Reserved for
future migration of the read-only-backend disambiguator currently
emitted as Error::Other("not supported: ...") by adapters such as
reposix-jira (full migration scheduled for v0.12.0).
VersionMismatch
Optimistic concurrency check failed: the caller’s version does
not match the backend’s current version.
Migrated from Error::Other(format!("version mismatch: {body}")) —
see code-quality audit P1-1 + P1-5 (POLISH2-09 partial). Closes the
stringly-typed protocol where downstream callers used to recover the
rejection body via msg.strip_prefix("version mismatch: ") plus
serde_json::from_str — pattern-match on body instead.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.