refactor: enhance code structure and add Terms of Service handling for API interactions

This commit is contained in:
2025-08-24 20:10:55 +05:30
parent 00c7c9f455
commit e434c3d2e0
10 changed files with 171 additions and 187 deletions

View File

@@ -0,0 +1,10 @@
"""
Custom exceptions for the Gemini Key Management script.
"""
class TermsOfServiceNotAcceptedError(Exception):
"""Raised when the Terms of Service for a required API have not been accepted."""
def __init__(self, message, url):
self.message = message
self.url = url
super().__init__(self.message)