{"record":{"id":"7087e480db584e1a","repo":"crowdsecurity/crowdsec","slug":"performing-request-w","errorCode":null,"errorMessage":"performing request: %w","messagePattern":"performing request: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apiclient/alerts_service.go","lineNumber":93,"sourceCode":"\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"building query: %w\", err)\n\t}\n\n\tURI := u\n\tif len(params) > 0 {\n\t\tURI = fmt.Sprintf(\"%s?%s\", URI, params.Encode())\n\t}\n\n\treq, err := s.client.PrepareRequest(ctx, http.MethodGet, URI, nil)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"building request: %w\", err)\n\t}\n\n\talerts := models.GetAlertsResponse{}\n\n\tresp, err := s.client.Do(ctx, req, &alerts)\n\tif err != nil {\n\t\treturn nil, resp, fmt.Errorf(\"performing request: %w\", err)\n\t}\n\n\treturn &alerts, resp, nil\n}\n\n// to demo query arguments\nfunc (s *AlertsService) Delete(ctx context.Context, opts AlertsDeleteOpts) (*models.DeleteAlertsResponse, *Response, error) {\n\tparams, err := qs.Values(opts)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tu := fmt.Sprintf(\"%s/alerts?%s\", s.client.URLPrefix, params.Encode())\n\n\treq, err := s.client.PrepareRequest(ctx, http.MethodDelete, u, nil)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/apiclient/alerts_service.go#L75-L111","documentation":"AlertsService.List executed the HTTP request via client.Do; a transport-level failure (network error, timeout, non-decodable response) occurred, so the alerts listing fails with the wrapped client error while still returning the response.","triggerScenarios":"Thrown at pkg/apiclient/alerts_service.go:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify LAPI is running and reachable at the configured URL","Check network/TLS configuration and certificates","Retry; transient network issues may resolve"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}