From fd46d122a55dd2046585ffc632f291b7ca9ecf2d Mon Sep 17 00:00:00 2001 From: Karl Cheng Date: Fri, 19 Apr 2024 15:40:11 +1000 Subject: [PATCH] Add comment --- sentry/issue_alerts.go | 4 +--- sentry/metric_alerts.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sentry/issue_alerts.go b/sentry/issue_alerts.go index 1bfd646..897a728 100644 --- a/sentry/issue_alerts.go +++ b/sentry/issue_alerts.go @@ -103,12 +103,10 @@ func (s *IssueAlertsService) Create(ctx context.Context, organizationSlug string return nil, resp, errors.New("missing task uuid") } // We just received a reference to an async task, we need to check another endpoint to retrieve the issue alert we created - alert, resp, err := s.getIssueAlertFromTaskDetail(ctx, organizationSlug, projectSlug, *alert.TaskUUID) + alert, resp, err = s.getIssueAlertFromTaskDetail(ctx, organizationSlug, projectSlug, *alert.TaskUUID) if err != nil { return nil, resp, err } - alert.TaskUUID = nil - return alert, resp, nil } alert.TaskUUID = nil diff --git a/sentry/metric_alerts.go b/sentry/metric_alerts.go index 0ad2e64..069829a 100644 --- a/sentry/metric_alerts.go +++ b/sentry/metric_alerts.go @@ -124,12 +124,10 @@ func (s *MetricAlertsService) Create(ctx context.Context, organizationSlug strin return nil, resp, errors.New("missing task uuid") } // We just received a reference to an async task, we need to check another endpoint to retrieve the metric alert we created - alert, resp, err := s.getMetricAlertFromMetricAlertTaskDetail(ctx, organizationSlug, projectSlug, *alert.TaskUUID) + alert, resp, err = s.getMetricAlertFromMetricAlertTaskDetail(ctx, organizationSlug, projectSlug, *alert.TaskUUID) if err != nil { return nil, resp, err } - alert.TaskUUID = nil - return alert, resp, nil } alert.TaskUUID = nil