synapse_application/
execution_error.rs1use soma_ops::OperationName;
2
3use crate::CompatibilityError;
4
5#[derive(Debug, thiserror::Error)]
7#[non_exhaustive]
8pub enum ExecutionError {
9 #[error(transparent)]
11 Compatibility(#[from] CompatibilityError),
12 #[error(transparent)]
14 Fleet(#[from] soma_fleet::FleetError),
15 #[error(transparent)]
17 Infra(#[from] soma_infra::InfraError),
18 #[error(transparent)]
20 Plan(#[from] soma_ops::PlanError),
21 #[error(transparent)]
23 Authorization(#[from] soma_ops::AuthorizationError),
24 #[error(transparent)]
26 Result(#[from] soma_ops::ResultError),
27 #[error(transparent)]
29 Target(#[from] soma_ops::TargetRefError),
30 #[error(transparent)]
32 Mutation(#[from] soma_infra::MutationFailure),
33 #[error("canonical runtime cannot execute {0}")]
35 UnsupportedOperation(OperationName),
36 #[error("mutation plan mismatch: {0}")]
38 PlanMismatch(String),
39 #[error("idempotent mutation requires an idempotency key")]
41 MissingIdempotencyKey,
42 #[error("disruptive mutation requires a confirmation reference")]
44 ConfirmationRequired,
45 #[error("{domain} mutation port is unavailable for host {host}")]
47 MutationPortUnavailable {
48 domain: &'static str,
50 host: String,
52 },
53 #[error("mutation deadline has passed")]
55 DeadlineExceeded,
56 #[error("operation requires an explicit host because the topology has multiple candidates")]
58 HostRequired,
59 #[error("host is not present in the current topology: {0}")]
61 HostNotFound(String),
62 #[error("invalid canonical parameter {field}: {message}")]
64 InvalidParameter {
65 field: String,
67 message: String,
69 },
70 #[error("Compose project {project} was not found on host {host}")]
72 ProjectNotFound {
73 host: String,
75 project: String,
77 },
78 #[error("canonical result serialization failed: {0}")]
80 Serialization(String),
81}
82
83#[cfg(test)]
84#[path = "execution_error_tests.rs"]
85mod tests;