Skip to content

Commit da6dc5b

Browse files
committed
Fix 4XX errors incorrectly categorized as 5XX in PDF splitting
1 parent 1e3f9e4 commit da6dc5b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/unstructured_client/_hooks/custom/split_pdf_hook.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,11 +669,8 @@ def after_success(
669669
elements = self._await_elements(operation_id)
670670

671671
# if fails are disallowed, return the first failed response
672-
# Note(austin): Stick a 500 status code in here so the SDK
673-
# does not trigger its own retry logic
674672
if not self.allow_failed and self.api_failed_responses.get(operation_id):
675673
failure_response = self.api_failed_responses[operation_id][0]
676-
failure_response.status_code = 500
677674

678675
self._clear_operation(operation_id)
679676
return failure_response

0 commit comments

Comments
 (0)