{"record":{"id":"98f7e44d3ccaff64","repo":"GopeedLab/gopeed","slug":"create-task-for-q-failed-w","errorCode":null,"errorMessage":"create task for %q failed: %w","messagePattern":"create task for %q failed: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/extmock/main.go","lineNumber":300,"sourceCode":"\t\t}\n\t\tif file.Req == nil {\n\t\t\treturn fmt.Errorf(\"file %d request is nil\", idx)\n\t\t}\n\n\t\ttargetDir := resourceOutputDir\n\t\tif file.Path != \"\" {\n\t\t\ttargetDir = filepath.Join(resourceOutputDir, file.Path)\n\t\t}\n\t\tif err := os.MkdirAll(targetDir, 0o755); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\ttaskID, err := d.CreateDirect(file.Req, &base.Options{\n\t\t\tPath: targetDir,\n\t\t\tName: file.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"create task for %q failed: %w\", file.Name, err)\n\t\t}\n\t\twaiter.Register(taskID)\n\n\t\tsummary.Files = append(summary.Files, &downloadedFileResult{\n\t\t\tIndex:  idx,\n\t\t\tName:   file.Name,\n\t\t\tPath:   filepath.Join(targetDir, file.Name),\n\t\t\tTaskID: taskID,\n\t\t\tReq:    file.Req,\n\t\t})\n\t}\n\n\tvar stopVerbose func()\n\tif verbose {\n\t\tstopVerbose = startVerboseTaskListener(d, summary.Files)\n\t\tdefer stopVerbose()\n\t}\n","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/GopeedLab/gopeed/blob/7b7327ffb30816273a74b142cccc0bc10c5a4c67/cmd/extmock/main.go#L282-L318","documentation":"Error \"create task for %q failed: %w\" thrown in GopeedLab/gopeed.","triggerScenarios":"Thrown at cmd/extmock/main.go:300 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":"7b7327ffb30816273a74b142cccc0bc10c5a4c67","analyzedAt":"2026-08-16T02:51:03.250Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}