Raise error when response not OK
This commit is contained in:
@@ -38,4 +38,6 @@ class MatrixClient:
|
|||||||
}
|
}
|
||||||
response = requests.get(self.ONE_TO_MANY_URL, params=request_params)
|
response = requests.get(self.ONE_TO_MANY_URL, params=request_params)
|
||||||
|
|
||||||
|
response.raise_for_status() # raise exception if not 200 OK
|
||||||
|
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user