Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed Nov 10, 2024
1 parent ce075c3 commit 8b02198
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions keep/providers/pagerduty_provider/pagerduty_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,10 @@ def _trigger_incident(
}

r = requests.post(url, headers=headers, data=json.dumps(payload))

print(f"Status Code: {r.status_code}")
print(r.json())
return r.json()
r.raise_for_status()
response = r.json()
self.logger.info("Incident triggered")
return response

def dispose(self):
"""
Expand Down Expand Up @@ -484,10 +484,10 @@ def _notify(
kwargs (dict): The providers with context
"""
if self.authentication_config.routing_key:
return self._send_alert(title, alert_body, dedup=dedup, **kwargs)
return self._send_alert(title, alert_body, dedup=dedup)
else:
return self._trigger_incident(
service_id, title, alert_body, requester, incident_id, **kwargs
service_id, title, alert_body, requester, incident_id
)

def _query(self, incident_id: str = None):
Expand Down

0 comments on commit 8b02198

Please sign in to comment.