tempo_ext/installer/
error.rs1use std::io;
4
5#[derive(Debug, thiserror::Error)]
7pub enum InstallerError {
8 #[error("io error: {0}")]
9 Io(#[from] io::Error),
10
11 #[error("json error: {0}")]
12 Json(#[from] serde_json::Error),
13
14 #[error("network error: {0}")]
15 Network(#[from] reqwest::Error),
16
17 #[error("home directory not found")]
18 HomeDirMissing,
19
20 #[error("missing release manifest: pass --release-manifest")]
21 MissingReleaseManifest,
22
23 #[error("missing release public key: pass --release-public-key")]
24 MissingReleasePublicKey,
25
26 #[error("insecure release manifest URL: {0} (requires https://, file://, or local path)")]
27 InsecureManifestUrl(String),
28
29 #[error("release manifest not found: {0}")]
30 ReleaseManifestNotFound(String),
31
32 #[error("extension metadata missing in release manifest: {0}")]
33 ExtensionNotInManifest(String),
34
35 #[error("signature missing in release manifest for {0}")]
36 SignatureMissing(String),
37
38 #[error("invalid signature format for {field}: {details}")]
39 SignatureFormat {
40 field: &'static str,
41 details: String,
42 },
43
44 #[error("signature verification failed for {0}")]
45 SignatureVerificationFailed(String),
46
47 #[error("insecure download URL: {0} (requires https://, file://, or local path)")]
48 InsecureDownloadUrl(String),
49
50 #[error("checksum mismatch for {binary}: expected {expected}, got {actual}")]
51 ChecksumMismatch {
52 binary: String,
53 expected: String,
54 actual: String,
55 },
56
57 #[error("trusted comment mismatch for {artifact}: expected \"{expected}\", got \"{actual}\"")]
58 TrustedCommentMismatch {
59 artifact: String,
60 expected: String,
61 actual: String,
62 },
63}