Skip to content

Commit 52f2e99

Browse files
committed
Cover exception requests.exceptions.HTTPError as per krakenex v2.0.0 migration instructions
1 parent 584a8ef commit 52f2e99

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/clikraken/api/api_utils.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"""
1111

1212
import http.client
13+
import requests.exceptions
1314
import socket
1415
from collections import OrderedDict
1516

@@ -73,7 +74,8 @@ def query_api(api_type, api_method, api_params, args):
7374
try:
7475
# call to the krakenex API
7576
res = func(api_method, api_params)
76-
except (socket.timeout, socket.error, http.client.BadStatusLine) as e:
77+
except (socket.timeout, socket.error,
78+
http.client.BadStatusLine, requests.exceptions.HTTPError) as e:
7779
log('Network error while querying Kraken API!')
7880
log('Error details: ' + repr(e))
7981
except ValueError as e:

0 commit comments

Comments
 (0)