From ecabf5768ff9b031cf6635611fb77cd0ebd4a6c8 Mon Sep 17 00:00:00 2001 From: CBroz1 Date: Wed, 25 Oct 2023 12:33:48 -0500 Subject: [PATCH] Add error code --- datajoint/connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datajoint/connection.py b/datajoint/connection.py index b6b273a43..65b096ab0 100644 --- a/datajoint/connection.py +++ b/datajoint/connection.py @@ -79,6 +79,8 @@ def translate_query_error(client_error, query): # Integrity errors if err == 1062: return errors.DuplicateError(*args) + if err == 1217: # MySQL 8 error code + return errors.IntegrityError(*args) if err == 1451: return errors.IntegrityError(*args) if err == 1452: