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

Function version_mismatch_message

atomic-remote/src/error.rs:159–170  ·  view source on GitHub ↗

Build the display message for a version mismatch error.

(client_version: &str, server_version: Option<&str>)

Source from the content-addressed store, hash-verified

157
158/// Build the display message for a version mismatch error.
159fn version_mismatch_message(client_version: &str, server_version: Option<&str>) -> String {
160 let server_line = match server_version {
161 Some(v) => format!("\n Server min-version: {v}"),
162 None => String::new(),
163 };
164 format!(
165 "Failed to decode data from remote — the client and server may be running \
166 incompatible versions.\n \
167 Client version: {client_version}{server_line}\n \
168 Hint: run 'atomic update' to upgrade, or ask the storage owner for their server version."
169 )
170}
171
172/// Format a list of hashes for display.
173fn format_hashes(hashes: &[String]) -> String {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected