Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix 4XX errors incorrectly categorized as 5XX in PDF splitting #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/unstructured_client/_hooks/custom/split_pdf_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down