At https://github.com/crate-workbench/mlflow-cratedb/issues/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.
About
At https://github.com/crate-workbench/mlflow-cratedb/issues/9, we discovered that the CrateDB SQLAlchemy dialect raises a
ProgrammingError
exception when the server raises aDuplicateKeyException
. However, SQLAlchemy-based applications seem to expect theIntegrityError
exception type instead, see sqlalchemy_store.py.Details
mlflow-cratedb has a monkeypatch, which augments the
_raise_for_status
function to emit anIntegrityError
correspondingly.Proposal
Add this to the code base, untangled from the monkeypatch, together with an accompanying test case, if not present.