Skip to content

Use thiserror to handle errors #311

@bidoubiwa

Description

@bidoubiwa

⚠️ Do not start contributing to this issue before this PR is merged: #297

Currently we are implementing all our errors by hand.

Exemple:

impl From<MeilisearchError> for Error {
fn from(error: MeilisearchError) -> Self {
Self::Meilisearch(error)
}
}
impl From<jsonwebtoken::errors::Error> for Error {
fn from(error: jsonwebtoken::errors::Error) -> Error {
Error::InvalidTenantToken(error)
}
}

This would be way more simple using the thiserror library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions