This commit is contained in:
2025-07-02 06:14:28 +00:00
parent fb2944746f
commit 64dbeabb3a

View File

@@ -42,7 +42,7 @@ from openai import (
RateLimitError,
APIError,
Timeout,
InvalidRequestError,
BadRequestError, # <-- KORRIGIERT (war InvalidRequestError)
APIConnectionError, # ServiceUnavailableError ist oft APIConnectionError
)
from config import (Config, BRANCH_MAPPING_FILE, URL_CHECK_MARKER, USER_AGENTS, LOG_DIR)
@@ -126,7 +126,7 @@ def retry_on_failure(func):
decorator_logger.warning(f"Wiederhole Versuch {attempt + 1}/{max_retries_config} fuer '{effective_func_name}'...")
return func(*args, **kwargs)
except (gspread.exceptions.SpreadsheetNotFound, AuthenticationError, ValueError, InvalidRequestError) as e:
except (gspread.exceptions.SpreadsheetNotFound, AuthenticationError, ValueError, BadRequestError) as e:
decorator_logger.critical(f"❌ ENDGUELTIGER FEHLER bei '{effective_func_name}': Permanentes Problem erkannt. {type(e).__name__} - {str(e)[:150]}...")
decorator_logger.exception("Details:")
raise e