fix: address PR #589 review findings
- Fix anyio.Lock() created at module import time; use lazy init in get_shared_storage() to avoid instantiation before event loop exists - Stop get_login_flow_session from silently swallowing DB exceptions; re-raise and handle in caller with proper error response - Update ProvisionAccessResponse and UpdateScopesResponse status field docs to include all actual values (declined, cancelled, unchanged) - Narrow except clause in present_login_url to (AttributeError, NotImplementedError) instead of bare Exception - Add KeyError handling in LoginFlowV2Client.initiate() and poll() for clear errors on malformed Nextcloud responses - Simplify redundant env-var bypass branches in scope_authorization.py - Extract _maybe_login_flow_cleanup() context manager to replace 4 inline cleanup loop registrations in app.py; move sleep to end of loop body so cleanup runs once at startup - Replace fragile string replacement in _rewrite_login_flow_url with proper urllib.parse URL handling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
1a6ce0fa7d
commit
ba597634bd
@@ -70,7 +70,9 @@ async def present_login_url(
|
||||
logger.info("User cancelled login flow")
|
||||
return "cancelled"
|
||||
|
||||
except Exception as e:
|
||||
# Elicitation not supported by this client - fall back to message
|
||||
logger.debug(f"Elicitation not available ({e}), returning URL in message")
|
||||
except (AttributeError, NotImplementedError) as e:
|
||||
# Elicitation not supported by this client/SDK - fall back to message
|
||||
logger.debug(
|
||||
f"Elicitation not available ({type(e).__name__}: {e}), returning URL in message"
|
||||
)
|
||||
return "message_only"
|
||||
|
||||
Reference in New Issue
Block a user