Skip to content

Commit

Permalink
fix(pingdom-operator): 403 on create
Browse files Browse the repository at this point in the history
  • Loading branch information
nefelim4ag committed Jun 1, 2023
1 parent 9c82fc9 commit 060071d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pingdom-operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 060071d

Please sign in to comment.