crate / crash

Crash is an interactive CrateDB command line interface (CLI) SQL shell with autocompletion.
Apache License 2.0
48 stars 13 forks source link

Fixed handling of `DuplicateKeyException` errors after crate-python 0.34 #439

Closed amotl closed 6 months ago

amotl commented 6 months ago

Problem

Thanks for reporting, @romseygeek and @proddata.

Details

After an improvement in crate-python 0.34, this error case is conveyed through IntegrityError. Beforehand, a more generic ProgrammingError was used.

Without the update, a duplicate key exception causes crash to exit prematurely and unexpectedly, when using more recent versions of crate-python.

Solution

Now, both exception types will be handled in the same way.