format_login_failure(
exc: BaseException,
) -> str| Name | Type | Description |
|---|---|---|
exc* | BaseException | Root exception caught from the login worker. |
Return a token-safe single-line summary of an OAuth-login exception.
OAuth handshakes commonly surface as ExceptionGroup (anyio task
groups) or as MCP-SDK errors whose args/repr may include an
OAuthToken. Never call str()/repr() on the raw exception for
display or logging — instead, prefer a known-safe nested
MCPReauthRequiredError message, fall back to the messages of our
own loopback-related exception types, and degrade to a class-name
chain for anything else.