Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SQLAlchemy: Expecting IntegrityError, but ProgrammingError is raised #96

@amotl

Description

@amotl

About

At crate/mlflow-cratedb#9, we discovered that the CrateDB SQLAlchemy dialect raises a ProgrammingError exception when the server raises a DuplicateKeyException. However, SQLAlchemy-based applications seem to expect the IntegrityError exception type instead, see sqlalchemy_store.py.

Details

mlflow-cratedb has a monkeypatch, which augments the _raise_for_status function to emit an IntegrityError correspondingly.

Proposal

Add this to the code base, untangled from the monkeypatch, together with an accompanying test case, if not present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions