Move error handling functions to _exception

This commit is contained in:
Mads Marquart
2020-01-15 11:05:59 +01:00
parent 3445eccc32
commit 3cdd646c37
6 changed files with 80 additions and 73 deletions

View File

@@ -293,7 +293,7 @@ class Session:
def _payload_post(self, url, data, files=None):
j = self._post(url, data, files=files)
_util.handle_payload_error(j)
_exception.handle_payload_error(j)
try:
return j["payload"]
except (KeyError, TypeError) as e: