From 64dbeabb3a116d84b2280d6ce8158e23ff04da58 Mon Sep 17 00:00:00 2001 From: Floke Date: Wed, 2 Jul 2025 06:14:28 +0000 Subject: [PATCH] bugfix --- helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers.py b/helpers.py index 20588ac9..05a56f3c 100644 --- a/helpers.py +++ b/helpers.py @@ -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