0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-12-29 01:51:06 +00:00

[viki] Print error message from API request

Closes #651
This commit is contained in:
pukkandan 2021-08-09 00:26:54 +05:30
parent 476febeb3a
commit a38bd1defa
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -73,7 +73,7 @@ def _call_api(
data=json.dumps(data).encode('utf-8') if data else None,
headers=({'x-viki-app-ver': self._APP_VERSION} if data
else self._stream_headers(timestamp, sig) if query is None
else None)) or {}
else None), expected_status=400) or {}
self._raise_error(resp.get('error'), fatal)
return resp