mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-24 05:09:27 +00:00
fix(api): Add automatic token refresh on 401 errors in GoCardless service.
- Add _make_authenticated_request helper that automatically handles 401 errors - Clear token cache and retry once when encountering expired tokens - Refactor all API methods to use centralized request handling - Fix banks API to properly handle institutions response structure - Eliminates need for container restarts when tokens expire 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ async def get_bank_institutions(
|
||||
countries=inst["countries"],
|
||||
logo=inst.get("logo"),
|
||||
)
|
||||
for inst in institutions_data
|
||||
for inst in institutions_data.get("results", [])
|
||||
]
|
||||
|
||||
return APIResponse(
|
||||
|
||||
Reference in New Issue
Block a user