{"record":{"id":"6c8d4d60616de3c5","repo":"fish2018/pansou","slug":"quarkres-http-d","errorCode":null,"errorMessage":"[quarkres] HTTP %d","messagePattern":"\\[quarkres\\] HTTP (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/quarkres/quarkres.go","lineNumber":100,"sourceCode":"\n\treq, err := http.NewRequest(\"GET\", searchURL, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"[quarkres] create request failed: %w\", err)\n\t}\n\treq.Header.Set(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36\")\n\treq.Header.Set(\"Accept\", \"application/json, text/plain, */*\")\n\treq.Header.Set(\"Accept-Language\", \"zh-CN,zh;q=0.9\")\n\treq.Header.Set(\"Connection\", \"keep-alive\")\n\treq.Header.Set(\"Referer\", \"https://squark.cc.cd/\")\n\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 {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/quarkres/quarkres.go#L82-L118","documentation":"Status error in quarkres' doSearch (plugin/quarkres/quarkres.go:100): the squark.cc.cd API returned a non-200 status. The request and headers were fine at transport level but the endpoint refused the query.","triggerScenarios":"Thrown at plugin/quarkres/quarkres.go:100 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["对 429/503 增加退避重试","核对 Referer 与 UA 是否被拦截","记录状态码监控端点健康"],"exampleFix":null,"handlingStrategy":"retry","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"}