wash-cli 0.34.1

wasmCloud Shell (wash) CLI tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Error-related utilities for use by `wash`

use std::error::Error;

use anyhow::anyhow;

/// Simple helper function to suggest running a host if no responders are found
pub(crate) fn suggest_run_host_error(
    e: Box<dyn Error + std::marker::Send + Sync>,
) -> anyhow::Error {
    if e.to_string().contains("no responders") {
        anyhow!("No responders found for config put request. Is a host running?")
    } else {
        anyhow!(e)
    }
}