diff --git a/job_controller/jobs/source_file_sorter/job.py b/job_controller/jobs/source_file_sorter/job.py
index 8d897e24e4b644d9bd1882cf0cd32d308a383fbc..0bba22aa06e6b46f8b2af831efa4e86c6ab87ad4 100644
--- a/job_controller/jobs/source_file_sorter/job.py
+++ b/job_controller/jobs/source_file_sorter/job.py
@@ -291,7 +291,7 @@ def execute(database, own_job_id, input_data: CJsonObject):
         # Sort every file in its own transaction to reduce blocking the database
         try:
             database.execute_write_transaction_and_commit(
-                _sort_file, own_job_id, db_path,
+                _sort_file, own_job_id, db_path, on_transaction_failure,
             )
         except Exception:
             if on_transaction_failure.func is not None: