fix(http): keep snapshot names in one path segment and report odd server responses clearly

Snapshot names are URL-encoded and names that would change the path are refused; every trailing slash is stripped from the endpoint; a non-JSON body or a redirect gets a message that says so instead of a parser error; requests use HTTP/1.1. snapshot delete reports a missing snapshot API like save and load, save warns that --message is not sent yet, and export/import no longer cite a server version that does not exist.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
Hector Ventura committed 2026-10-10 21:11:38 -05:00
1 parent 771b353733
commit c3e74e4815
7 files changed
+234 -18

No files matched your search

@@ -47,7 +47,12 @@ public class SnapshotDeleteCommand implements Callable<Integer> {
printer.println(Ansi.green("Snapshot deleted:") + " " + name);
return 0;
} catch (FlociException e) {
printer.error("Failed to delete snapshot: " + e.getMessage());
if (e.getMessage().contains("404") || e.getMessage().contains("501")) {
printer.error("Snapshot API not available on this server version.\n" +
"Track progress: " + profile.serverRepo() + "/issues");
} else {
printer.error("Failed to delete snapshot: " + e.getMessage());
}
return 1;
}
}