Created a _process_request_for_auth helper method

This commit is contained in:
Taylor Wilsdon
2025-08-05 10:44:27 -04:00
parent 0967594097
commit 07c065c57b
3 changed files with 162 additions and 282 deletions

View File

@@ -11,6 +11,7 @@ from typing import List, Optional
from googleapiclient.errors import HttpError
from .api_enablement import get_api_enablement_message
from auth.google_auth import GoogleAuthenticationError
logger = logging.getLogger(__name__)
@@ -306,6 +307,9 @@ def handle_http_errors(tool_name: str, is_read_only: bool = False, service_type:
except TransientNetworkError:
# Re-raise without wrapping to preserve the specific error type
raise
except GoogleAuthenticationError:
# Re-raise authentication errors without wrapping
raise
except Exception as e:
message = f"An unexpected error occurred in {tool_name}: {e}"
logger.exception(message)