diff options
| author | 2019-09-14 13:02:23 +0200 | |
|---|---|---|
| committer | 2019-09-14 13:02:23 +0200 | |
| commit | f714fa93d691a264a2f4e2b8cd798aa4276caab0 (patch) | |
| tree | 403abf720579e2a62b2a1bb00b209acf1ebf2e31 /bot/utils/moderation.py | |
| parent | Add error handlers for more command exceptions (diff) | |
Add API response dict to ResponseCodeError
The ReponseCodeError held a reference to `aiohttp.ResonseObject` to
make sure the response data was available. However, the response data
is not actually included in the Response Object, but needs to be
awaited.
Unfortunately, the ResponseCodeError is usually inspected after the
connection has been closed, triggering a ClientConnectionError when the
data was retrieved.
I solved this by adding the awaited reponse data directly to our custom
exception by awaiting the response.json() before raising the exception.
Diffstat (limited to 'bot/utils/moderation.py')
0 files changed, 0 insertions, 0 deletions
