Rework classes for better error handling #180
No reviewers
Labels
No labels
bug
config update
documentation
duplicate
enhancement
in dev
input needed
new feature
not in draft
refactor
waiting on docs update
wont-do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Sirdog/EnduraBot!180
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/itad-classes"
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?
While working to address #170 I went ahead and just did an overhaul of the relevant ITAD classes for better error handling and flow overall.
Work done:
/gameand logging in the cog to include API errorscheck_connection()method in both ITAD classes which just caused/gameto hit the API 2 extra times unnecessarily; new checks built into the API chaining handle this.Given the fact that ITAD returned status code 403, which typically means unauthorized, when the site was down in it's entirety, it likely means that a 403 return is just how ITAD's API responds when their shit hits the fan.
So, this PR closes #170, insofar as it is impossible to programmatically determine the difference between our API key being rejected and ITAD being down. Though echoing "our API key was rejected" isn't untrue, given if their API is down it technically means it rejects all API keys.
Closes #170