You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The bitcoin command fails to parse the response since Coindesk have fixed their API. discord.app_commands.errors.CommandInvokeError: Command 'bitcoin' raised an exception: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: application/json; charset=utf-8', url=URL('https://api.coindesk.com/v1/bpi/currentprice/BTC.json')
To Reproduce
Run /bitcoin
Expected behavior
An embed with the current price of bitcoin is displayed
Template Version
6.1.0
Additional context
Coindesk seems to have fixed their API to return the correct MIME type. Previously it returned application/javascript as noted in the code. I would propose removing the explicit content_type (default application/json) or setting it to None to explicitly ignore MIME type.
The text was updated successfully, but these errors were encountered:
Describe the bug
The bitcoin command fails to parse the response since Coindesk have fixed their API.
discord.app_commands.errors.CommandInvokeError: Command 'bitcoin' raised an exception: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: application/json; charset=utf-8', url=URL('https://api.coindesk.com/v1/bpi/currentprice/BTC.json')
To Reproduce
Run
/bitcoin
Expected behavior
An embed with the current price of bitcoin is displayed
Template Version
6.1.0
Additional context
Coindesk seems to have fixed their API to return the correct MIME type. Previously it returned
application/javascript
as noted in the code. I would propose removing the explicitcontent_type
(defaultapplication/json
) or setting it toNone
to explicitly ignore MIME type.The text was updated successfully, but these errors were encountered: