{"record":{"id":"01c068820b1d0b65","repo":"fish2018/pansou","slug":"misoso-api-error-w","errorCode":null,"errorMessage":"misoso API error: %w","messagePattern":"misoso API error: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/hunhepan/hunhepan.go","lineNumber":118,"sourceCode":"\t}()\n\n\tgo func() {\n\t\tdefer wg.Done()\n\t\titems, err := p.searchAPI(client, KuakeAPI, keyword)\n\t\tif err != nil {\n\t\t\terrChan <- fmt.Errorf(\"kuake API error: %w\", err)\n\t\t\treturn\n\t\t}\n\t\tresultChan <- items\n\t}()\n\n\tgo func() {\n\t\tdefer wg.Done()\n\t\tdebugLog(\"调用 misoso API\")\n\t\titems, err := p.searchAPI(client, MisosoAPI, keyword)\n\t\tif err != nil {\n\t\t\tdebugLog(\"misoso API 错误: %v\", err)\n\t\t\terrChan <- fmt.Errorf(\"misoso API error: %w\", err)\n\t\t\treturn\n\t\t}\n\t\tdebugLog(\"misoso API 返回 %d 条结果\", len(items))\n\t\tresultChan <- items\n\t}()\n\n\t// 启动一个goroutine等待所有请求完成并关闭通道\n\tgo func() {\n\t\twg.Wait()\n\t\tclose(resultChan)\n\t\tclose(errChan)\n\t}()\n\n\t// 收集结果\n\tvar allItems []HunhepanItem\n\tvar errors []error\n\n\t// 从通道读取结果","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/hunhepan/hunhepan.go#L100-L136","documentation":"Per-source wrapped error in hunhepan's parallel search fan-out (plugin/hunhepan/hunhepan.go:118): the misoso backend's searchAPI failed; the underlying error is wrapped with the source name and sent to errChan while other API goroutines continue.","triggerScenarios":"p.searchAPI(client, MisosoAPI, keyword) returns an error: HTTP failure, non-2xx response, or JSON decode error from the misoso endpoint during a keyword search.","commonSituations":"misoso 上游接口变更或超时。","solutions":["Read the wrapped error / debug log (\"misoso API 错误\") for the root cause","Verify the MisosoAPI URL and payload against the live API","Add retry/backoff for transient failures","Proceed with results from the other three endpoints (partial-failure tolerant aggregation)","If persistent, update or disable the misoso source in the plugin"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":"func isMisosoAPIError(err error) bool {\n\treturn err != nil && strings.Contains(err.Error(), \"misoso API error\")\n}","tryCatchPattern":"if err != nil && isMisosoAPIError(err) {\n\tlog.Printf(\"misoso source failed: %v\", err) // other sources still usable\n}","preventionTips":["Enable the plugin's debug logging to capture the raw misoso error","Test the misoso endpoint against the live API after any upstream update","Handle partial results: one source failing should not fail the whole search","Add per-source timeouts so a slow misoso response doesn't cascade"],"tags":["api","network","upstream","concurrency"],"backgroundTag":"upstream-api-error","analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}