fix: enhance PlusAPI and TraceBatchManager with timeout handling and graceful failure logging (#3416)

* Added timeout parameters to PlusAPI trace event methods for improved reliability.
* Updated TraceBatchManager to handle None responses gracefully, logging warnings instead of errors.
* Improved logging messages to provide clearer context during trace batch initialization and event sending failures.
This commit is contained in:
Lorenze Jay
2025-08-27 18:43:03 -07:00
committed by GitHub
parent 109de91d08
commit 6ee9db1d4a
3 changed files with 37 additions and 15 deletions

View File

@@ -56,6 +56,8 @@ class TokenManager:
:return: The access token if valid and not expired, otherwise None.
"""
encrypted_data = self.read_secure_file(self.file_path)
if encrypted_data is None:
return None
decrypted_data = self.fernet.decrypt(encrypted_data) # type: ignore
data = json.loads(decrypted_data)