From 6cc8c02ccc04b064094e858f953ebf6bfdf2c5ce Mon Sep 17 00:00:00 2001 From: Steve Garon Date: Wed, 13 May 2020 08:53:49 -0400 Subject: [PATCH] Also trap cases where service service completely crash dues to what we sent it. --- assemblyline_service_client/task_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assemblyline_service_client/task_handler.py b/assemblyline_service_client/task_handler.py index 2dfd4fd..3984464 100644 --- a/assemblyline_service_client/task_handler.py +++ b/assemblyline_service_client/task_handler.py @@ -396,7 +396,7 @@ def handle_task_result(self, result_json_path: str, task: ServiceTask): data['freshen'] = False r = self.request_with_retries('post', self._path('task'), json=data) - except ServiceServerException as e: + except (ServiceServerException, requests.HTTPError) as e: self.handle_task_error(task, message=str(e), error_type='EXCEPTION', status='FAIL_NONRECOVERABLE') def handle_task_error(self, task: ServiceTask, error_json_path: Optional[str] = None,