Fix 404 error handling in Abnormal Security fetch-incidents#43268
Merged
Fix 404 error handling in Abnormal Security fetch-incidents#43268
Conversation
* Fix 404 error handling in Abnormal Security threat incident fetching When a threat is deleted or archived, the API returns 404. Previously this aborted the entire fetch-incidents process. Now 404 errors are caught and the threat is skipped, allowing remaining threats to be processed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Extend error handling to all fetch-incidents entity loops - Added _is_skippable_error helper: skips all 4xx except 401, 403, 429 - Applied error handling to generate_abuse_campaign_incidents - Applied error handling to generate_account_takeover_cases_incidents - Updated generate_threat_incidents to use the new helper - Added comprehensive parametrized tests for all three functions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add Divesh Kumar to CONTRIBUTORS.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Use e.res.status_code instead of regex for error classification Address review feedback: extract HTTP status code directly from DemistoException.res.status_code rather than parsing the error string with regex. More reliable and cleaner. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add missing created field to pack_metadata.json Address content-bot review: add mandatory created timestamp (ISO 8601 format) based on original pack commit date. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
🤖 AI-Powered Code Review AvailableHi @kamalq97, you can leverage AI-powered code review to assist with this PR! Available Commands:
|
kamalq97
approved these changes
Feb 25, 2026
Contributor
Author
🤖 AI-Powered Code Review AvailableYou can leverage AI-powered code review to assist with this PR! Available Commands:
|
Coverage Report
|
||||||||||||||||||||||||||||||
Contributor
Author
|
Validate summary Verdict: PR can be force merged from validate perspective? ✅ |
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.
Original External PR
external pull request
Contributor
@krdivesh
Summary
fetch-incidentswould abort the entire fetch process, freezinglast_fetchand blocking all incident ingestion_is_skippable_errorhelper that classifies errors by HTTP status code:Changes
AbnormalSecurity.py: Added_is_skippable_error()helper, applied try/except togenerate_threat_incidents,generate_abuse_campaign_incidents, andgenerate_account_takeover_cases_incidentsAbnormalSecurity_test.py: Added parametrized tests for error classification, skip/raise behavior for all three entity typesReleaseNotes/2_4_2.md: Updated release notesCONTRIBUTORS.json: Added contributorTest plan
last_fetchadvances, fetch history shows all "Completed"demisto-sdk validatepasses🤖 Generated with Claude Code
fixes: https://jira-dc.paloaltonetworks.com/browse/CIAC-16005