pub enum LinkError {
Show 18 variants
NoHub,
NoCredential,
BadKey,
UnsafeHub {
hub: String,
},
Transport {
hub: String,
message: String,
},
Http {
what: &'static str,
status: u16,
message: String,
code: Option<String>,
},
NotJson {
what: &'static str,
status: u16,
},
ResponseTooLarge,
BadAddress {
given: String,
reason: String,
},
BadGrantId {
given: String,
},
UnsafePath {
path: String,
},
PushTooLarge {
detail: String,
},
ProposeTooLarge {
bytes: u64,
},
NotUtf8 {
path: String,
},
InvalidPack {
message: String,
},
InvalidFeed {
message: String,
},
Io(Error),
Store(StoreError),
}Expand description
Everything that can go wrong on the wire or at its edges. Each variant maps onto one stable CLI error code; messages are single-line and never echo the credential.
Variants§
NoHub
No hub URL was configured anywhere (flag, env, .dbmd/config).
NoCredential
The verb needs a credential and none was present.
BadKey
The credential contains whitespace / non-ASCII (a paste artifact). The key is deliberately not echoed.
UnsafeHub
A non-HTTPS hub outside loopback: the bearer key would travel in cleartext.
Transport
TCP/TLS-level failure: the hub never answered.
Http
The hub answered with an HTTP error status.
Fields
NotJson
A 2xx whose body is not JSON — a captive portal, a proxy, or a wrong URL — refused here rather than deserializing into nothing downstream.
Fields
ResponseTooLarge
The hub response exceeded [MAX_RESPONSE_BYTES].
BadAddress
A malformed @brain/id address.
BadGrantId
A grant id whose shape cannot travel as a URL path segment.
UnsafePath
An exported file path that would escape or pollute the destination
(absolute, .., a dot-leading segment, or an illegal character). The
hub is not trusted with local path layout.
PushTooLarge
The store exceeds the hub’s bounded whole-snapshot caps.
ProposeTooLarge
The propose body exceeds the hub’s inbox cap.
NotUtf8
A store file that is not valid UTF-8 cannot travel the JSON push path.
InvalidPack
A downloaded pack failed validation before any local write.
InvalidFeed
A signed feed entry, hash chain, or advertised feed head did not verify.
Io(Error)
Local filesystem failure while materializing a pull or reading a push.
Store(StoreError)
A store-level failure (walking the local store for a push).
Trait Implementations§
Source§impl Error for LinkError
impl Error for LinkError
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()