{"record":{"id":"6ac00174fe66e837","repo":"crowdsecurity/crowdsec","slug":"while-pulling-allowlist-s","errorCode":null,"errorMessage":"while pulling allowlist: %s","messagePattern":"while pulling allowlist: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apiserver/apic.go","lineNumber":736,"sourceCode":"\t}\n\n\tif link.URL == nil {\n\t\tlog.Warnf(\"allowlist %s has no URL\", *link.Name)\n\t\treturn nil\n\t}\n\n\tif link.ID == nil {\n\t\treturn fmt.Errorf(\"allowlist %s has no ID\", *link.Name)\n\t}\n\n\tdescription := \"\"\n\tif link.Description != nil {\n\t\tdescription = *link.Description\n\t}\n\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, *link.URL, http.NoBody)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"while pulling allowlist: %s\", err)\n\t}\n\n\tresp, err := client.GetClient().Do(req)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"while pulling allowlist: %s\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tscanner := bufio.NewScanner(resp.Body)\n\titems := make([]*models.AllowlistItem, 0)\n\n\tfor scanner.Scan() {\n\t\titem := scanner.Text()\n\t\tj := &models.AllowlistItem{}\n\n\t\tif err := json.Unmarshal([]byte(item), j); err != nil {\n\t\t\treturn fmt.Errorf(\"while unmarshalling allowlist item: %s\", err)\n\t\t}","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/apiserver/apic.go#L718-L754","documentation":"While fetching or processing an allowlist entry's remote content (HTTP GET of link.URL, or scanning the response body), the request/scanner failed. Both the request-build failure and the Do() failure are wrapped with this same message. Note the error is attached with %s, not %w, so it does not unwrap.","triggerScenarios":"Thrown at pkg/apiserver/apic.go:736 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the allowlist URL is reachable from the crowdsec host","Inspect the logged error string: connection errors point to the upstream host; scanner errors point to oversized or malformed content","Retry the pull; transient upstream failures resolve on the next cycle"],"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"}