Skip to content

Commit 89dc9b7

Browse files
committed
chore: Clean up some outdated warning logs
- Remove note about using the freemium url if you recieve a 401 - Remove "Failed to partition" error log
1 parent c34ae91 commit 89dc9b7

File tree

4 files changed

+0
-37
lines changed

4 files changed

+0
-37
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from .clean_server_url_hook import CleanServerUrlSDKInitHook
22
from .logger_hook import LoggerHook
3-
from .suggest_defining_url import SuggestDefiningUrlIf401AfterErrorHook
43
from .split_pdf_hook import SplitPdfHook
54
import logging

src/unstructured_client/_hooks/custom/logger_hook.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def after_error(
7878
# NOTE: Even though this is an after_error method, due to split_pdf_hook logic we may get
7979
# a success here when one of the split requests was partitioned successfully
8080
return response, error
81-
logger.error("Failed to partition the document.")
8281
if response:
8382
logger.error("Server responded with %d - %s", response.status_code, response.text)
8483
if error is not None:

src/unstructured_client/_hooks/custom/suggest_defining_url.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/unstructured_client/_hooks/registration.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from .custom import (
44
CleanServerUrlSDKInitHook,
55
LoggerHook,
6-
SuggestDefiningUrlIf401AfterErrorHook,
76
SplitPdfHook,
87
)
98
from .types import Hooks
@@ -23,7 +22,6 @@ def init_hooks(hooks: Hooks):
2322

2423
# Initialize custom hooks
2524
clean_server_url_hook = CleanServerUrlSDKInitHook()
26-
suggest_defining_url_hook = SuggestDefiningUrlIf401AfterErrorHook()
2725
logger_hook = LoggerHook()
2826
split_pdf_hook = SplitPdfHook()
2927

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

4543
# Register After Error hooks
46-
hooks.register_after_error_hook(suggest_defining_url_hook)
4744
hooks.register_after_error_hook(split_pdf_hook)
4845
hooks.register_after_error_hook(logger_hook)

0 commit comments

Comments
 (0)