diff --git a/pingdom-operator.py b/pingdom-operator.py index e0677fe..e689f5a 100755 --- a/pingdom-operator.py +++ b/pingdom-operator.py @@ -532,7 +532,13 @@ def create_check(self, ingress, tags: list = None): url = self.api_url('checks') response = self.s.post(url, json=create_request) - response.raise_for_status() + + try: + response.raise_for_status() + except requests.exceptions.HTTPError: + print(response.json()["error"]) + return dict(response.json()) + self.__parse_headers(response.headers) self.__clear_caches()