pub enum RemoteError {
BadRequest(String),
NotFound(String),
CasMismatch {
current: Cid,
},
Internal(String),
}Expand description
Error type for the /remote/v1/* surface. Each variant maps to a
single HTTP status code and renders as RFC 7807
application/problem+json with fields type, title, status,
and detail. The type URI is stable per variant so clients can
programmatically branch on it without string-matching detail.
Variants§
BadRequest(String)
Request body was malformed (bad JSON, unknown field, bad CID string, or inner codec/transport error).
NotFound(String)
Requested resource (e.g. a ref name) does not exist.
CasMismatch
Compare-and-swap on advance-head saw a different current CID
than the caller expected. Body carries the current CID in the
problem document’s current extension field so the client can
rebase without a second round trip.
Internal(String)
Internal server-side failure (blockstore I/O, lock poison, codec bug). Body carries a sanitised message.