wick_trigger_wasm_command/
error.rs#[derive(thiserror::Error, Debug)]
#[allow(clippy::exhaustive_enums)]
pub enum Error {
#[error("failed load component, {0}")]
ComponentLoad(wasmtime::Error),
#[error("failed to fetch wasm bytes, {0}")]
ComponentFetch(Box<dyn std::error::Error + Send + Sync + 'static>),
#[error("failed to link component, {0}")]
Linker(wasmtime::Error),
#[error("failed to build WASI context, {0}")]
WasiBuild(wasmtime::Error),
#[error("could not instantiate component, {0}")]
Instantiation(wasmtime::Error),
#[error("could not link with WASI Command bindings, {0}")]
WasiCommand(wasmtime::Error),
#[error("component returned with error, {0}")]
CommandRun(wasmtime::Error),
}
impl From<Error> for wick_trigger::Error {
fn from(value: Error) -> Self {
wick_trigger::Error::new_context("wasm-command", wick_trigger::ErrorKind::Trigger(Box::new(value)))
}
}