From 505be2cf00b17b23dd25efd1db52fbc263889e83 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Apr 2020 20:09:31 +0200 Subject: Raise error if something is wrong when request the API --- pyfunkwhale/client.py | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.1