Add aiohttp.ClientError handling to all API call functions
#29
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
ai-working
bug
enhancement
feature
in-queue
performance
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#29
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
api_calls.pycatchesasyncio.TimeoutErrorbut notaiohttp.ClientConnectionErrororaiohttp.ClientResponseError. DNS failure or refused connection raises unformatted error to Discord user.PR opened: #57
Added
except aiohttp.ClientError as ehandlers to all five API functions (db_get,db_patch,db_post,db_put,db_delete). Each handler logs the error and raisesDatabaseErrorso callers get a consistent, formatted exception instead of a raw aiohttp error bubbling up to Discord users.