fix(cdp_monitoring): skip 422 errors per item instead of crashing#439
Merged
Merged
Conversation
A single 422 response from the CDP API was raising an unhandled HTTPError and aborting the entire ingest loop. Wrap each per-item call in try/except so bad items are skipped and logged while all other records continue to ingest normally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
o-mura
approved these changes
Jun 9, 2026
o-mura
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding the exception handling!
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
ingest_activation.py,ingest_journey_summary.py,ingest_journey_activation.py) crash entirely when any single item returns a 422 from the CDP APItry/except requests.exceptions.HTTPErrorso bad items are logged and skipped while all other records continue to ingestTest plan
Skipping audience/journey <id>: ...activations,journey_summary, andjourney_activationtables🤖 Generated with Claude Code