Conversation
Contributor License Agreement✅ CLA signed 💚 Thank you Tatamis for signing the Contributor License Agreement! Your pull request can now be reviewed and merged. We appreciate your contribution to Filigran's open source projects! ❤️ This is an automated message from the Filigran CLA Bot. |
Contributor
There was a problem hiding this comment.
Pull request overview
Stops CrowdStrike pagination after API errors, avoiding missing pagination metadata and adding regression coverage.
Changes:
- Stops pagination after logged API errors.
- Adds a 401-style missing-pagination regression test.
- Preserves the original API error instead of raising
KeyError.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Summary and findings |
|---|---|
external-import/crowdstrike/src/crowdstrike_feeds_services/utils/__init__.py |
Stops processing errored responses. Critical (3 votes): failure is swallowed and work may be recorded as successful. Moderate (1 vote): empty-body errors can still raise KeyError before the guard. |
external-import/crowdstrike/tests/test_paginate_error_logging.py |
Adds missing-pagination coverage. Nit (3 votes): add two blank lines between module-level functions. |
Suppressed comments (1)
external-import/crowdstrike/src/crowdstrike_feeds_services/utils/init.py:210
- This guard is only reached after
errors = response["errors"].BaseCrowdstrikeClient.handle_api_errornormalizes non-2xx responses with an empty body to{}, and the API clients pass that body intopaginate, so responses such as an empty-body 403 still raiseKeyError: 'errors'before reaching this return. Detect the error/malformed envelope before indexing or normalize every error body to include an error marker.
# An API error response is not a valid paginated result.
# FalconPy may return reduced metadata without a ``pagination``
# key, so stop here instead of trying to process the error
# response as a successful page.
return
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # FalconPy may return reduced metadata without a ``pagination`` | ||
| # key, so stop here instead of trying to process the error | ||
| # response as a successful page. | ||
| return |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Tatamis
marked this pull request as draft
September 12, 2026 13:52
Tatamis
marked this pull request as ready for review
September 12, 2026 13:59
Black and flake8 (E303) expect two blank lines between top-level definitions; there were three.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stops the CrowdStrike paginator when the API response contains errors instead of continuing to process the response as a valid paginated result.
FalconPy error responses may contain reduced metadata without a
paginationkey. Continuing pagination in that case causes the original API error to be replaced by aKeyError: 'pagination'.This change preserves the existing API error logging and stops processing the invalid response before accessing pagination metadata.
Addresses #7430
Changes
meta.paginationKeyErrorTesting
Ran the full CrowdStrike connector test suite:
The two warnings are existing deprecated configuration warnings and are unrelated to this change.
Also verified:
with no errors.
I did not perform an end-to-end test against a live CrowdStrike/OpenCTI deployment because that would require valid CrowdStrike API credentials.