MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / map_remote_error

Method map_remote_error

atomic-cli/src/commands/identity/lookup_key.rs:140–151  ·  view source on GitHub ↗

Map a remote error, giving a clear message for the common 404 case.

(&self, e: RemoteError, canonical: &str)

Source from the content-addressed store, hash-verified

138
139 /// Map a remote error, giving a clear message for the common 404 case.
140 fn map_remote_error(&self, e: RemoteError, canonical: &str) -> CliError {
141 match &e {
142 RemoteError::HttpError { status: 404, .. } => CliError::RemoteError {
143 message: format!(
144 "No identity registered for public key {} on that server",
145 short_key(canonical)
146 ),
147 url: None,
148 },
149 _ => crate::commands::client::remote_err(e),
150 }
151 }
152
153 /// Print human-readable output.
154 fn output_default(

Callers 1

executeMethod · 0.80

Calls 1

remote_errFunction · 0.85

Tested by

no test coverage detected