aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-04-11 20:09:31 +0200
committerneodarz <neodarz@neodarz.net>2020-04-11 20:09:31 +0200
commit505be2cf00b17b23dd25efd1db52fbc263889e83 (patch)
tree811daaae287e533529ee25e3854f185f0b821534
parent9ddb45ffbfe0c10c8ae01f84e7b353cf2536454d (diff)
downloadpyfunkwhale-505be2cf00b17b23dd25efd1db52fbc263889e83.tar.xz
pyfunkwhale-505be2cf00b17b23dd25efd1db52fbc263889e83.zip
Raise error if something is wrong when request the API
Diffstat (limited to '')
-rw-r--r--pyfunkwhale/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyfunkwhale/client.py b/pyfunkwhale/client.py
index 06dda16..81611ba 100644
--- a/pyfunkwhale/client.py
+++ b/pyfunkwhale/client.py
@@ -72,4 +72,6 @@ class Client(object):
r = call(self.domain + '/api/v1/' + endpoint, headers=headers,
params=params, data=data)
+ r.raise_for_status()
+
return r