{"record":{"id":"87e7259c948189da","repo":"GopeedLab/gopeed","slug":"task-s-finished-with-status-s","errorCode":null,"errorMessage":"task %s finished with status %s","messagePattern":"task (.+?) finished with status (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/extmock/main.go","lineNumber":636,"sourceCode":"}\n\nfunc (w *taskTerminalWaiter) currentTerminalTask(id string) (*download.Task, bool) {\n\ttask := w.downloader.GetTask(id)\n\tif task == nil {\n\t\treturn nil, false\n\t}\n\tif task.Status != base.DownloadStatusDone && task.Status != base.DownloadStatusError {\n\t\treturn nil, false\n\t}\n\treturn task, true\n}\n\nfunc (w *taskTerminalWaiter) taskError(task *download.Task) error {\n\tif task == nil {\n\t\treturn fmt.Errorf(\"task is nil\")\n\t}\n\tif task.Status == base.DownloadStatusError {\n\t\treturn fmt.Errorf(\"task %s finished with status %s\", task.ID, task.Status)\n\t}\n\treturn nil\n}\n\nfunc startVerboseTaskListener(d *download.Downloader, files []*downloadedFileResult) func() {\n\ttracked := make(map[string]string, len(files))\n\tfor _, file := range files {\n\t\ttracked[file.TaskID] = file.Name\n\t}\n\td.Listener(func(event *download.Event) {\n\t\tif event == nil || event.Task == nil {\n\t\t\treturn\n\t\t}\n\t\tname, ok := tracked[event.Task.ID]\n\t\tif !ok {\n\t\t\treturn\n\t\t}\n\t\tswitch event.Key {","sourceCodeStart":618,"sourceCodeEnd":654,"githubUrl":"https://github.com/GopeedLab/gopeed/blob/7b7327ffb30816273a74b142cccc0bc10c5a4c67/cmd/extmock/main.go#L618-L654","documentation":"Error \"task %s finished with status %s\" thrown in GopeedLab/gopeed.","triggerScenarios":"Thrown at cmd/extmock/main.go:636 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"}