lbry-sdk/lbry/extras/daemon
belikor b7791d2845 exchange_rate_manager: raise exception if 'error' is in json_response
If the error is not handled, the running daemon will continuously
print the following error message:
```
Traceback (most recent call last):
  File "lbry/extras/daemon/exchange_rate_manager.py", line 77, in get_rate
  File "lbry/extras/daemon/exchange_rate_manager.py", line 189, in get_rate_from_response
KeyError: 0
```

This started happening when the UPBit exchange decided to delist
the LBC coin.

Normally `json_response` should be a dictionary, not a list,
so `json_response[0]` causes an error.

By checking for the `'error'` key, we can raise the proper exception.

Once this is done, the message will be a warning, not a traceback.
```
WARNING  lbry.extras.daemon.exchange_rate_manager:92:
Failed to get exchange rate from UPbit: result not found
```
2021-07-19 13:41:49 -04:00
..
migrator moved lbry up one level 2020-01-01 15:57:56 -05:00
__init__.py moved lbry up one level 2020-01-01 15:57:56 -05:00
analytics.py fallback to getting external ip from spv servers instead of internal apis 2021-01-21 16:20:53 -05:00
client.py moved lbry up one level 2020-01-01 15:57:56 -05:00
comment_client.py fix test 2021-01-04 18:04:06 -03:00
component.py updated imports after renaming component files 2020-01-03 03:08:15 -05:00
componentmanager.py wallet_status no longer fails if wallet component has not started 2020-03-31 16:20:13 -04:00
components.py added support to config for determining if value is set and implemented hub selection logic 2021-06-22 11:07:58 -04:00
daemon.py fix docopt typo 2021-06-02 12:05:36 -04:00
exchange_rate_manager.py exchange_rate_manager: raise exception if 'error' is in json_response 2021-07-19 13:41:49 -04:00
json_response_encoder.py drop value_type for support 2021-06-02 18:01:54 -03:00
security.py Origin: null no longer allowed 2020-06-03 14:19:16 -04:00
storage.py fix not knowing a torrent exists 2020-05-07 04:04:55 -03:00
undecorated.py moved lbry up one level 2020-01-01 15:57:56 -05:00