Skip to content

question: How can I convert mysql errors to HandlerError ? #549

@antonio-hickey

Description

@antonio-hickey

Hey all, sorry in advance for putting a question in issues, but I'm having trouble converting error's from mysql crate to HandlerError was wondering if anyone could assist.

The mysql crate docs has this:

let pool = Pool::new(url)?;

I tried this with no luck:

let pool = Pool::new(url).map_err(|e| HandlerError::from(format!("{:?}", e).as_str()))?;

Any help is appreciated thanks!

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