summaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'api.py')
-rw-r--r--api.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/api.py b/api.py
index 6c960b1..935991d 100644
--- a/api.py
+++ b/api.py
@@ -132,6 +132,10 @@ class Processor(joblib.worker.Worker):
logging.error("%s: deadlocked!", jobid)
raise joblib.worker.JobFailed("deadlock",
True) # critical
+ except asyncpg.exceptions.IntegrityConstraintViolationError as err:
+ logging.error("%s: SQL error '%s'!", jobid, err)
+ raise joblib.worker.JobFailed({"id": object_id,
+ "error": str(err)}, True)
logging.debug("record processed")
if obj_id is not None: