From e376b0bf3a38e42c7201e16163e311a972bc71e7 Mon Sep 17 00:00:00 2001 From: Murad-Suleymanov Date: Tue, 23 Jun 2026 11:10:23 +0400 Subject: [PATCH] feat(jira): add JIRA_SKIP_UNPARSEABLE_ISSUES to skip unparseable issue pages When a Jira issue page returns a successful (2xx) status but a body that cannot be parsed as JSON (e.g. a truncated/partial response), collectIssues currently fails the entire subtask and aborts the whole Jira collection. This adds an opt-in config JIRA_SKIP_UNPARSEABLE_ISSUES that, when true, logs a warning and skips the unparseable page so the rest of the collection can finish. Default behaviour (false) is unchanged. Signed-off-by: Murad-Suleymanov --- backend/plugins/jira/tasks/issue_collector.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/plugins/jira/tasks/issue_collector.go b/backend/plugins/jira/tasks/issue_collector.go index 9a361cbbcca..7413c70b0ba 100644 --- a/backend/plugins/jira/tasks/issue_collector.go +++ b/backend/plugins/jira/tasks/issue_collector.go @@ -135,6 +135,12 @@ func CollectIssues(taskCtx plugin.SubTaskContext) errors.Error { } err = json.Unmarshal(blob, &data) if err != nil { + // By default surface the error so it's visible. Set JIRA_SKIP_UNPARSEABLE_ISSUES=true + // to skip unparseable pages instead of failing the collection. + if taskCtx.GetConfigReader().GetBool("JIRA_SKIP_UNPARSEABLE_ISSUES") { + logger.Warn(err, "skipping unparseable Jira issue page") + return nil, nil + } return nil, errors.Convert(err) } return data.Issues, nil