Closed ccrawford4 closed 4 months ago
Should add more general error handling such as: if response.status_code != 200: if response.status_code == 400: elif response.status_code == 403: else: ....
Should add more general error handling such as: if response.status_code != 200: if response.status_code == 400: elif response.status_code == 403: else: ....
This sounds good - what other ERROR codes does the API return? Is it just 200, 400, and 403?
!200 has excluded all other error case I think, we could just return a general form of message like "unknown error occur, please try again later...."
There are numerous API calls that the Discord Bot makes (Web login, core, DC, etc). We should implement a timer so that if the request times out we can handle the error more gracefully and prompt the users to try again. At present if any of our API calls or Database connections time out then the application fails.