{"record":{"id":"8fe1e524a09b4920","repo":"crowdsecurity/crowdsec","slug":"get-stream-w","errorCode":null,"errorMessage":"get stream: %w","messagePattern":"get stream: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apiserver/apic.go","lineNumber":612,"sourceCode":"\t\treturn nil\n\t}\n\n\t/*defer lock release*/\n\tdefer func() {\n\t\tlog.Debug(\"Releasing lock for pullCAPI\")\n\n\t\tif err := a.dbClient.ReleasePullCAPILock(ctx); err != nil {\n\t\t\tlog.Errorf(\"while releasing lock: %v\", err)\n\t\t}\n\t}()\n\n\tlog.Infof(\"Starting community-blocklist update\")\n\n\tlog.Debugf(\"Community pull: %t | Blocklist pull: %t\", a.pullCommunity, a.pullBlocklists)\n\n\tdata, _, err := a.apiClient.Decisions.GetStreamV3(ctx, apiclient.DecisionsStreamOpts{Startup: a.startup, CommunityPull: a.pullCommunity, AdditionalPull: a.pullBlocklists})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"get stream: %w\", err)\n\t}\n\n\ta.startup = false\n\t/*to count additions/deletions across lists*/\n\n\tlog.Debugf(\"Received %d new decisions\", len(data.New))\n\tlog.Debugf(\"Received %d deleted decisions\", len(data.Deleted))\n\n\tif data.Links != nil {\n\t\tlog.Debugf(\"Received %d blocklists links\", len(data.Links.Blocklists))\n\t\tlog.Debugf(\"Received %d allowlists links\", len(data.Links.Allowlists))\n\t}\n\n\taddCounters, deleteCounters := makeAddAndDeleteCounters()\n\n\t// process deleted decisions\n\tnbDeleted, err := a.HandleDeletedDecisionsV3(ctx, data.Deleted, deleteCounters)\n\tif err != nil {","sourceCodeStart":594,"sourceCodeEnd":630,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/apiserver/apic.go#L594-L630","documentation":"The HTTP GET to the CAPI decisions stream endpoint (GetStreamV3, community blocklist + blocklist pull) failed — at startup or on a periodic pull. Causes: network failure, CAPI 5xx, timeout, or auth token expiry. The pull-top lock is released afterwards; the blocklist is simply not refreshed this round.","triggerScenarios":"Thrown at pkg/apiserver/apic.go:612 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check outbound connectivity to api.crowdsec.net (TLS, proxy, DNS)","If the token expired the client re-authenticates — verify credentials if auth errors persist","Check CAPI status pages for outages; the pull retries 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-14T05:17:10.506Z"}