Skip to content

chore: Clean up some outdated warning logs #241

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
Mar 3, 2025
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion src/unstructured_client/_hooks/custom/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .clean_server_url_hook import CleanServerUrlSDKInitHook
from .logger_hook import LoggerHook
from .suggest_defining_url import SuggestDefiningUrlIf401AfterErrorHook
from .split_pdf_hook import SplitPdfHook
import logging
1 change: 0 additions & 1 deletion src/unstructured_client/_hooks/custom/logger_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def after_error(
# NOTE: Even though this is an after_error method, due to split_pdf_hook logic we may get
# a success here when one of the split requests was partitioned successfully
return response, error
logger.error("Failed to partition the document.")
if response:
logger.error("Server responded with %d - %s", response.status_code, response.text)
if error is not None:
Expand Down
32 changes: 0 additions & 32 deletions src/unstructured_client/_hooks/custom/suggest_defining_url.py

This file was deleted.

3 changes: 0 additions & 3 deletions src/unstructured_client/_hooks/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from .custom import (
CleanServerUrlSDKInitHook,
LoggerHook,
SuggestDefiningUrlIf401AfterErrorHook,
SplitPdfHook,
)
from .types import Hooks
Expand All @@ -23,7 +22,6 @@ def init_hooks(hooks: Hooks):

# Initialize custom hooks
clean_server_url_hook = CleanServerUrlSDKInitHook()
suggest_defining_url_hook = SuggestDefiningUrlIf401AfterErrorHook()
logger_hook = LoggerHook()
split_pdf_hook = SplitPdfHook()

Expand All @@ -43,6 +41,5 @@ def init_hooks(hooks: Hooks):
hooks.register_after_success_hook(logger_hook)

# Register After Error hooks
hooks.register_after_error_hook(suggest_defining_url_hook)
hooks.register_after_error_hook(split_pdf_hook)
hooks.register_after_error_hook(logger_hook)