} catch (Exception e) {
throw new NotificationFailedException("Failed to send notification to PagerDuty", e);
}
if (result != null && !"success".equals(result.status())) {
throw new NotificationFailedException("Failed to send notification to PagerDuty: '" + result.status() + "', " + result.message());
}
}
private Map<String, String> details(Check check, List<Alert> alerts) throws JsonProcessingException {
ObjectMapper mapper = new ObjectMapper();