From 46971fe96f45db7aa5da7a0e8e0ac63f74d375f4 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Tue, 5 Jul 2016 16:19:19 +0200 Subject: [PATCH] Raise error when response not OK --- .../cartodb_services/cartodb_services/mapzen/matrix_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/lib/python/cartodb_services/cartodb_services/mapzen/matrix_client.py b/server/lib/python/cartodb_services/cartodb_services/mapzen/matrix_client.py index de9b5cc..9b4df53 100644 --- a/server/lib/python/cartodb_services/cartodb_services/mapzen/matrix_client.py +++ b/server/lib/python/cartodb_services/cartodb_services/mapzen/matrix_client.py @@ -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()