Skip to content

Commit 279b40a

Browse files
committed
fix: handle errors when pushing findings to Jira in FindingSerializer
1 parent 04561b8 commit 279b40a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

dojo/api_v2/serializers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1890,7 +1890,9 @@ def update(self, instance, validated_data):
18901890

18911891
if push_to_jira or finding_helper.is_keep_in_sync_with_jira(instance):
18921892
# Push synchronously so that we can see jira errors in real time
1893-
jira_helper.push_to_jira(instance, sync=True)
1893+
success, message = jira_helper.push_to_jira(instance, sync=True)
1894+
if not success:
1895+
raise serializers.ValidationError(message)
18941896

18951897
return instance
18961898

0 commit comments

Comments
 (0)