Raise error when response not OK

This commit is contained in:
Rafa de la Torre 2016-07-05 16:19:19 +02:00
parent 96199b0d6d
commit 46971fe96f

View File

@ -38,4 +38,6 @@ class MatrixClient:
}
response = requests.get(self.ONE_TO_MANY_URL, params=request_params)
response.raise_for_status() # raise exception if not 200 OK
return response.json()