sir-lancebot
sir-lancebot copied to clipboard
Avoidance of `KeyError` from `"draft"` key when pulling GitHub PR data.
Closes #928
We want to ensure the information received from GitHub is not malformed.
Due to this, FetchError handling has been moved to fetch_data function, so no placeholder variables in returns need to be used.
FetchError is no longer a data class, but an actual error which inherets from Exception.
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [x] Ensure there is an issue open, or link relevant discord discussions?
- [x] Read and agree to the contributing guidelines?
Next, we need to add a cog error handler so raised FetchErrors are displayed to the users in a neatly formatted embed.
@GDWR Would you like to take over this PR?
Will finish this at a later time. Closing, since it'll become stale in the meantime.