Skip to content

Commit 38e0e40

Browse files
committed
fix: add missing exception chaining in _verify_via_api
Self-audit caught: _verify_local had 'from e' on all 3 except handlers, but _verify_via_api's catch-all was missing it. Original Supabase error traceback was being lost on API fallback failures. 289 tests pass.
1 parent 9e6d2c1 commit 38e0e40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/services/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _verify_via_api(self, token: str) -> Dict[str, Any]:
9797
raise
9898
except Exception as e:
9999
logger.debug("API-based JWT verification failed", error=str(e))
100-
raise AuthenticationError("Token verification failed")
100+
raise AuthenticationError("Token verification failed") from e
101101

102102
async def signup(self, email: str, password: str, github_username: Optional[str] = None) -> Dict[str, Any]:
103103
"""

0 commit comments

Comments
 (0)