Skip to content

Implement Display trait for ManticoreError #3

@oooo-ps

Description

@oooo-ps

I'm currently using this construction because the Anyhow crate can't handle ManticoreError type:

client
    .sql(
        "CREATE TABLE IF NOT EXISTS ... (
            ...
        )",
        Some(true),
    )
    .await
    .map_err(|e: ManticoreError| {
        Error::msg(match e {
            ManticoreError::Api(e) => todo!(),
            ManticoreError::Header(e) => e.to_string(),
            ManticoreError::Http(e) => e.to_string(),
            ManticoreError::Hyper(e) => e.to_string(),
            ManticoreError::HyperClient(e) => e.to_string(),
            ManticoreError::Serde(e) => e.to_string(),
            ManticoreError::UriError(e) => e.to_string(),
        })
    })?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions