{"record":{"id":"dcc58f97d43b0b9c","repo":"fish2018/pansou","slug":"quarkres-decode-response-failed-w","errorCode":null,"errorMessage":"[quarkres] decode response failed: %w","messagePattern":"\\[quarkres\\] decode response failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/quarkres/quarkres.go","lineNumber":110,"sourceCode":"\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"[quarkres] request failed: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tif resp.StatusCode != 200 {\n\t\treturn nil, fmt.Errorf(\"[quarkres] HTTP %d\", resp.StatusCode)\n\t}\n\n\tbodyBytes, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"[quarkres] read response failed: %w\", err)\n\t}\n\n\tvar ar apiResp\n\tif err := json.Unmarshal(bodyBytes, &ar); err != nil {\n\t\treturn nil, fmt.Errorf(\"[quarkres] decode response failed: %w\", err)\n\t}\n\n\tif ar.Code != 200 {\n\t\treturn nil, fmt.Errorf(\"[quarkres] API error: %s\", ar.Message)\n\t}\n\n\tresults := make([]model.SearchResult, 0, len(ar.Data))\n\tfor _, item := range ar.Data {\n\t\tlinks := make([]model.Link, 0, len(item.Links))\n\t\tfor _, l := range item.Links {\n\t\t\t// 只保留夸克链接（本源只有夸克）\n\t\t\tif strings.Contains(l.URL, \"pan.quark.cn\") {\n\t\t\t\tlinks = append(links, model.Link{\n\t\t\t\t\tType:     \"quark\",\n\t\t\t\t\tURL:      l.URL,\n\t\t\t\t\tPassword: l.Password,\n\t\t\t\t\tDatetime: item.Datetime,\n\t\t\t\t})","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/quarkres/quarkres.go#L92-L128","documentation":"Wrapped decode error in quarkres' doSearch (plugin/quarkres/quarkres.go:110): the body downloaded but did not unmarshal into the apiResp struct — the endpoint returned non-JSON content (challenge/error page or changed schema).","triggerScenarios":"Thrown at plugin/quarkres/quarkres.go:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["记录原始响应体确认实际内容","对照 API 更新 apiResp 结构","解析前校验 Content-Type"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}