Skip to content

Commit 09d15d2

Browse files
committed
Renamed from_http_error to http_error_to_tidal_error
Changed import from session to exceptions
1 parent 37ec9a3 commit 09d15d2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tidalapi/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class InvalidUPC(TidalAPIError):
6464
pass
6565

6666

67-
def from_http_error(http_error: HTTPError) -> TidalAPIError | None:
67+
def http_error_to_tidal_error(http_error: HTTPError) -> TidalAPIError | None:
6868
response = http_error.response
6969

7070
if response.content:

tidalapi/request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
import requests
3636

37-
from tidalapi.session import from_http_error
37+
from tidalapi.exceptions import http_error_to_tidal_error
3838
from tidalapi.types import JsonObj
3939

4040
log = logging.getLogger(__name__)
@@ -154,7 +154,7 @@ def request(
154154
except requests.HTTPError as e:
155155
log.info("Request resulted in exception {}".format(e))
156156
self.latest_err_response = request
157-
if err := from_http_error(e):
157+
if err := http_error_to_tidal_error(e):
158158
raise err from e
159159
else:
160160
raise # re raise last error, usually HTTPError

0 commit comments

Comments
 (0)