AardWolf / aardcogs

Cogs for Discord-Red
MIT License
4 stars 4 forks source link

DDP (and others?) get an incorrect mimetype sometimes #154

Closed AardWolf closed 4 years ago

AardWolf commented 4 years ago

this should a caught exception:

[2019-09-30 20:21:24] [ERROR] red: Exception in command 'ddp'
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.7.2/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
    ret = await coro(*args, **kwargs)
  File "/opt/red3/cogs/CogManager/cogs/untappd/untappd.py", line 1121, in ddp
    j = await resp.json()
  File "/root/.pyenv/versions/3.7.2/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1027, in json
    headers=self.headers)
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8'
AardWolf commented 4 years ago

This may be fixed. The "failure" method was missing a JSON on the sheet side.