File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 4
4
from typing import NotRequired , TypedDict
5
5
from urllib import parse
6
6
7
+ import sentry_sdk
7
8
from django .db .models import Max
8
9
from django .urls import reverse
9
10
from django .utils .translation import gettext as _
@@ -229,18 +230,16 @@ def incident_attachment_info(
229
230
except AlertRuleDetector .DoesNotExist :
230
231
raise ValueError ("Alert rule detector not found when querying for AlertRuleDetector" )
231
232
233
+ workflow_engine_params = title_link_params .copy ()
234
+
232
235
try :
233
236
open_period_incident = IncidentGroupOpenPeriod .objects .get (
234
237
group_open_period_id = metric_issue_context .open_period_identifier
235
238
)
236
- except IncidentGroupOpenPeriod .DoesNotExist :
237
- raise ValueError (
238
- "Incident group open period not found when querying for IncidentGroupOpenPeriod"
239
- )
240
-
241
- workflow_engine_params = title_link_params .copy ()
242
-
243
- workflow_engine_params ["alert" ] = str (open_period_incident .incident_identifier )
239
+ workflow_engine_params ["alert" ] = str (open_period_incident .incident_identifier )
240
+ except IncidentGroupOpenPeriod .DoesNotExist as e :
241
+ sentry_sdk .capture_exception (e )
242
+ # Swallowing the error here since this model isn't being written to just yet
244
243
245
244
title_link = build_title_link (alert_rule_id , organization , workflow_engine_params )
246
245
You can’t perform that action at this time.
0 commit comments