Refactor backend and frontend cleanup paths
This commit is contained in:
@@ -10,9 +10,8 @@ Design notes:
|
||||
already async and awaited directly.
|
||||
- CloudConnectionError is imported from google_drive_backend (shared type).
|
||||
This keeps the exception hierarchy unified across all cloud backends.
|
||||
- B2 design: This backend is STATELESS. It raises CloudConnectionError but
|
||||
does NOT update the DB or CloudConnection objects. DB state transitions
|
||||
(e.g., REQUIRES_REAUTH) are handled by _call_cloud_op() in cloud.py.
|
||||
- This backend is stateless. It raises CloudConnectionError but does not
|
||||
update the DB or CloudConnection objects.
|
||||
- _ensure_valid_token() checks expiry before each API call and calls
|
||||
_refresh_token() if the token is within 60 seconds of expiry. If the
|
||||
refresh returns None (invalid_grant), CloudConnectionError is raised.
|
||||
|
||||
Reference in New Issue
Block a user