Skip to content

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

Closed

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!

Activity

  1. locked and limited conversation to collaborators on Oct 13, 2022
  2. converted this issue into a discussion #550 on Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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