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

Function server_note

libatomic/src/identity_transport.rs:242–252  ·  view source on GitHub ↗

The server's own words from the `409` body, quoted verbatim; empty when the server sent no readable reason.

(server: Option<&BindServerError>)

Source from the content-addressed store, hash-verified

240/// The server's own words from the `409` body, quoted verbatim; empty when the
241/// server sent no readable reason.
242fn server_note(server: Option<&BindServerError>) -> String {
243 let Some(server) = server else {
244 return String::new();
245 };
246 match (&server.code, &server.message) {
247 (Some(code), Some(message)) => format!(" (server code {code}: {message})"),
248 (Some(code), None) => format!(" (server code {code})"),
249 (None, Some(message)) => format!(" (server message: {message})"),
250 (None, None) => String::new(),
251 }
252}
253
254/// Bind the local identity to the remote before a push, refusing a push that
255/// would land on a project bound to a *different* identity. Pass the local

Callers 1

format_bind_conflictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected