Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLAlchemy: Expecting IntegrityError, but ProgrammingError is raised #96

Closed
amotl opened this issue Sep 14, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@amotl
Copy link
Member

amotl commented Sep 14, 2023

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.

@amotl
Copy link
Member Author

amotl commented Oct 6, 2023

This has been implemented with crate/crate-python#583, and we did not receive any complaints so far.

@amotl amotl closed this as completed Oct 6, 2023
@amotl amotl transferred this issue from crate/crate-python Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant