From da6dc5bbfeda2c37956c853f73d0edc3a0c6c6ea Mon Sep 17 00:00:00 2001 From: CyMule Date: Wed, 16 Jul 2025 11:49:49 -0400 Subject: [PATCH] Fix 4XX errors incorrectly categorized as 5XX in PDF splitting --- src/unstructured_client/_hooks/custom/split_pdf_hook.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/unstructured_client/_hooks/custom/split_pdf_hook.py b/src/unstructured_client/_hooks/custom/split_pdf_hook.py index 724a544b..eb4ae5a5 100644 --- a/src/unstructured_client/_hooks/custom/split_pdf_hook.py +++ b/src/unstructured_client/_hooks/custom/split_pdf_hook.py @@ -669,11 +669,8 @@ def after_success( elements = self._await_elements(operation_id) # if fails are disallowed, return the first failed response - # Note(austin): Stick a 500 status code in here so the SDK - # does not trigger its own retry logic if not self.allow_failed and self.api_failed_responses.get(operation_id): failure_response = self.api_failed_responses[operation_id][0] - failure_response.status_code = 500 self._clear_operation(operation_id) return failure_response