{"record":{"id":"74846436f9c58293","repo":"nikivdev/code","slug":"failed-to-fetch-task-logs","errorCode":null,"errorMessage":"Failed to fetch task logs: {}","messagePattern":"Failed to fetch task logs: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/processes.rs","lineNumber":646,"sourceCode":"                            if code == 0 {\n                                println!(\"\\n✓ Task completed successfully\");\n                            } else {\n                                println!(\"\\n✗ Task failed with exit code {}\", code);\n                            }\n                        }\n                        break;\n                    }\n                }\n                Ok(r) if r.status().as_u16() == 404 => {\n                    // Task not found yet, wait\n                    thread::sleep(Duration::from_millis(200));\n                    continue;\n                }\n                Ok(r) => {\n                    bail!(\"Hub returned error: {}\", r.status());\n                }\n                Err(e) => {\n                    bail!(\"Failed to fetch task logs: {}\", e);\n                }\n            }\n\n            thread::sleep(Duration::from_millis(500));\n        }\n    } else {\n        // One-shot fetch\n        let resp = client\n            .get(&url)\n            .send()\n            .context(\"failed to fetch task logs\")?;\n\n        if resp.status().as_u16() == 404 {\n            println!(\n                \"Task '{}' not found yet (queued). Streaming logs...\",\n                task_id\n            );\n            return show_hub_task_logs(task_id, true);","sourceCodeStart":628,"sourceCodeEnd":664,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/processes.rs#L628-L664","documentation":"Error \"Failed to fetch task logs: {}\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/processes.rs:646 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}