{"record":{"id":"b64b320d7f266dd8","repo":"zeroclaw-labs/zeroclaw","slug":"statuses-request-returned","errorCode":null,"errorMessage":"statuses request returned {}","messagePattern":"statuses request returned (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/jira_tool.rs","lineNumber":545,"sourceCode":"                        Some(e) => req.basic_auth(e, Some(&token)),\n                        None => req.bearer_auth(&token),\n                    };\n                    let resp = req.send().await.map_err(|e| {\n                        ::zeroclaw_log::record!(\n                            ERROR,\n                            ::zeroclaw_log::Event::new(\n                                module_path!(),\n                                ::zeroclaw_log::Action::Fail\n                            )\n                            .with_outcome(::zeroclaw_log::EventOutcome::Failure)\n                            .with_attrs(::serde_json::json!({\"error\": format!(\"{}\", e)})),\n                            \"jira: statuses request failed\"\n                        );\n                        anyhow::Error::msg(format!(\"statuses request failed: {e}\"))\n                    })?;\n\n                    if !resp.status().is_success() {\n                        anyhow::bail!(\"statuses request returned {}\", resp.status());\n                    }\n\n                    resp.json::<Value>().await.map_err(|e| {\n                        ::zeroclaw_log::record!(\n                            ERROR,\n                            ::zeroclaw_log::Event::new(\n                                module_path!(),\n                                ::zeroclaw_log::Action::Fail\n                            )\n                            .with_outcome(::zeroclaw_log::EventOutcome::Failure)\n                            .with_attrs(::serde_json::json!({\"error\": format!(\"{}\", e)})),\n                            \"jira: failed to parse statuses response\"\n                        );\n                        anyhow::Error::msg(format!(\"failed to parse statuses response: {e}\"))\n                    })\n                }\n                .await;\n                (i, result)","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/jira_tool.rs#L527-L563","documentation":"While list_projects enriches data it fetches workflow statuses in a parallel task; a non-2xx on that request bails with the bare status (no body inlined). Usually 401/403 - credentials or permission for the statuses endpoint - or 404 when the deployment or API version no longer serves that endpoint path. Because it runs inside the JoinSet, this failure fails the whole list_projects call.","triggerScenarios":"list_projects where the statuses endpoint is blocked for the token user, or the Jira version serves it under a different REST path - older Server builds and Cloud revisions have shuffled workflow-status endpoints; also a token revoked mid-session between the project call and the statuses call.","commonSituations":"Jira upgrades renaming status endpoints; integration users without workflow read permission; long-lived agent sessions outliving their tokens.","solutions":["Map the numeric status: 401 -> token expired or revoked, refresh it; 403 -> grant workflow/status read permission; 404 -> endpoint missing for that Jira version, upgrade zeroclaw-tools","Reproduce with curl against the statuses endpoint named in the error context","Re-run list_projects after the fix - the failure is per-request, not data corruption","If it persists, compare the exact URL being polled (enable reqwest/zeroclaw log output) against your Jira version's REST reference"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn is_jira_statuses_http_failure(err: &anyhow::Error) -> bool {\n    err.to_string().starts_with(\"statuses request returned \")\n}","tryCatchPattern":"match jira.execute(list_projects_args).await {\n    Ok(res) => res,\n    Err(e) if is_jira_statuses_http_failure(&e) => {\n        let code = e.to_string()\n            .rsplit(' ')\n            .next()\n            .and_then(|s| s.trim_matches('.').parse::<u16>().ok());\n        match code {\n            Some(401) => refresh_credentials(),\n            Some(403) => report_permission_gap(&e),\n            _ => return Err(e),\n        }\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Keep session lifetimes shorter than token lifetimes","Re-verify the Jira version's REST surface after upgrades","Give integration users read access to workflow statuses","Monitor this message - it is the earliest sign of endpoint drift"],"tags":["rust","zeroclaw","jira","statuses","workflow","http-status"],"backgroundTag":"jira-rest-api-error","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}