Repository navigation
fix: unhandled error code in facebook_custom_audience - #2853
Conversation
Signed-off-by: Sai Sankeerth <[email protected]>
WalkthroughThe changes involve updates to error handling, request and response data structures, and network call configurations for a Facebook utility and associated tests. A new error code mapping is introduced, request headers are standardized, and response bodies are expanded with detailed status and message properties. These modifications aim to enhance the robustness and clarity of interactions with Facebook's API for custom audience data delivery. Changes
Assessment against linked issues
Poem
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- src/v0/util/facebookUtils/networkHandler.js (1 hunks)
- test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts (1 hunks)
- test/integrations/destinations/fb_custom_audience/network.ts (1 hunks)
Additional comments: 4
src/v0/util/facebookUtils/networkHandler.js (2)
198-199: The addition of status code 200 to handle it as a permissions issue with a default status of 403 seems appropriate given the context provided. Ensure that this new error handling logic is consistent with the rest of the application's error handling strategy.
203-203: Ensure that the function
getErrorDetailsFromErrorMapis tested with the new error code 200 to verify that it correctly retrieves the error details as expected.test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts (1)
- 1-572: The changes in the test data are consistent with the PR's intent to handle status code
200as a permissions issue and to update the test cases accordingly. The use of single quotes for the keys in theheadersproperty and the addition of thestatusproperty in theoutputobject are also in line with the changes described in the summary.test/integrations/destinations/fb_custom_audience/network.ts (1)
- 1-480: The changes to the
networkCallsDataarray, including the updates to thehttpReqandhttpResobjects, appear to be consistent and align with the PR's aim to handle error code200as a permissions issue. The test cases seem to cover the new error handling logic appropriately.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2853 +/- ##
========================================
Coverage 87.16% 87.16%
========================================
Files 772 772
Lines 28788 28788
Branches 6764 6764
========================================
Hits 25094 25094
Misses 3351 3351
Partials 343 343 ☔ View full report in Codecov by Sentry. |
|
Kudos, SonarCloud Quality Gate passed!
|








Description of the change
The error code
200has not been handled properly infacebook_custom_audiencedestination. We have seen it being retried and getting aborted after retries are complete. Since this is a permissions issue, ideally it should beaborted.Type of change
Related issues
Resolves INT-1086
Checklists
Development
Code review
Summary by CodeRabbit
Bug Fixes
Tests