Compare commits

...

2 Commits

Author SHA1 Message Date
Tyler Goodlet b7883325a9 Woops, `data` can be an empty list XD 2024-05-28 16:19:28 -04:00
Tyler Goodlet 37ca081555 Woops, fix missing `api_url` ref in error log 2024-05-24 12:24:25 -04:00
1 changed files with 2 additions and 1 deletions

View File

@ -305,9 +305,10 @@ class Client:
headers=headers, headers=headers,
) )
json: dict = res.json() json: dict = res.json()
if data := json.get('data'): if (data := json.get('data')) is not None:
return data return data
else: else:
api_url: str = self._http.base_url
log.error( log.error(
f'Error making request to {api_url} ->\n' f'Error making request to {api_url} ->\n'
f'{pformat(res)}' f'{pformat(res)}'