Skip to content

fix(workflow-engine): Prevent ValueError for missing ActionTarget in serializer#119119

Open
sentry[bot] wants to merge 3 commits into
masterfrom
seer/fix/workflow-action-target-none
Open

fix(workflow-engine): Prevent ValueError for missing ActionTarget in serializer#119119
sentry[bot] wants to merge 3 commits into
masterfrom
seer/fix/workflow-action-target-none

fix(workflow-engine): Prevent ValueError for missing ActionTarget in …

f3b7c1c
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: sentry-backend-bugs completed Jul 7, 2026 in 0s

1 issue

sentry-backend-bugs: Found 1 issue (1 medium)

Medium

TypeError when `target_identifier` is None for Sentry App action - `src/sentry/incidents/endpoints/serializers/workflow_engine_action.py:20`

The PR guards against target_type being None but the same obj.config.get(...) pattern is used unguarded on the next line: sentry_app_id = int(obj.config.get("target_identifier")) will raise TypeError: int() argument must be a string…not 'NoneType' if target_identifier is absent from config for a Sentry App action. Add a None guard identical to the one added for target_type.


⏱ 1m 8s · 121.3k in / 7.0k out · $0.33

Annotations

Check warning on line 20 in src/sentry/incidents/endpoints/serializers/workflow_engine_action.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: sentry-backend-bugs

TypeError when `target_identifier` is None for Sentry App action

The PR guards against `target_type` being `None` but the same `obj.config.get(...)` pattern is used unguarded on the next line: `sentry_app_id = int(obj.config.get("target_identifier"))` will raise `TypeError: int() argument must be a string…not 'NoneType'` if `target_identifier` is absent from config for a Sentry App action. Add a `None` guard identical to the one added for `target_type`.