Skip to content

SQLAlchemy bad error handling #450

@Robin-Van-de-Merghel

Description

@Robin-Van-de-Merghel

SQLAlchemy doesn't give us the right "confort" for error handling. We need to handle it depending on which db engine we are using, and we need to use test like "text in the error detail" in e.details. For later, we'll need to find a better way.

Context from PR

If we check if an error is an instance of another module pymysql we could potentially catch some errors as code that are specific on a db. And even with that, I saw errors where people had to use both IntegrityError from sql-alchemy and pymy integrity error because of a bad handling..

It is not pretty, and you can read this response: https://stackoverflow.com/a/70714697

Originally posted by @Robin-Van-de-Merghel in #421 (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