Repository navigation
fix(fb_custom_audience): classify Facebook error 613 as throttled - #5733
Conversation
|
👋 I'm rudder-devbox. I opened this PR from task Mention |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5733 +/- ##
========================================
Coverage 92.40% 92.40%
========================================
Files 737 737
Lines 40856 40856
Branches 9509 9509
========================================
Hits 37751 37751
Misses 2921 2921
Partials 184 184 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The narrow mapping change follows existing error handling and has focused regression coverage, with no identified blocking issues.
No open issues 🎉
What changed in this PR
This PR updates the shared Facebook error handler so Graph API error 613 produces a throttled 429 result instead of an unhandled 500, without changing retry scheduling.
Changes:
- Adds error 613 to the existing rate-limit mapping and updates the reference comment.
- Adds unit and FB Custom Audience proxy-v1 coverage for the observed OAuthException, including per-job status and throttled classification.
| File | Description |
|---|---|
test/integrations/destinations/fb_custom_audience/network.ts |
Adds a mocked hourly-limit response with error 613. |
test/integrations/destinations/fb_custom_audience/dataDelivery/other.ts |
Verifies throttled proxy-v1 output without the unhandled-status tag. |
src/v0/util/facebookUtils/networkHandler.test.ts |
Adds a regression case for error 613 without a subcode. |
src/v0/util/facebookUtils/networkHandler.js |
Maps error 613 to 429 and documents the rate-limit reference. |
Review effort: Balanced
|
Knowledge distillation completed |
|
Knowledge distillation completed |
|



What are the changes introduced in this PR?
Map Facebook Graph API error 613 to 429 instead of an unhandled 500. Add unit and FB Custom Audience proxy-v1 coverage for the observed OAuthException response.
What is the related Linear task?
Resolves INT-7447
Please explain the objectives of your changes below
Stop treating the hourly API limit as an unhandled status and return a throttled per-job result. The shared map also serves other Facebook destinations; no retry scheduling logic changes.
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
Code 613 now returns 429 with
errorType: throttled, rather than 500 with the unhandled-status meta tag. Existing rate-limit mappings are unchanged.Any new dependencies introduced with this change?
None.
Any new generic utility introduced or modified. Please explain the changes.
None; this adds an entry to the existing shared error map.
Any technical or performance related pointers to consider with the change?
The static message retains the existing suffix formatter's double period. No control-flow or performance changes.
Validation
Passed:
npm run lint;npm test -- --testPathPattern="src/v0/util/facebookUtils/networkHandler.test.ts" --no-coverage --runInBand;npm run test:ts -- component --destination=fb_custom_audience --feature=dataDelivery --runInBand;npx tsc --noEmit -p tsconfig.json;npx tsc --noEmit -p tsconfig.test.json;git diff --check.Passed targeted secret-path derivation with
SECRET_PATHS_DESTINATION=fb_custom_audience SECRET_PATHS_INTEGRATIONS_CONFIG=/workspace/rudder-integrations-config/src/configurations/destinations npm run generate:secret-paths; Facebook's paths were unchanged, so the full catalog artifact was restored.No simplifications worth making.
Local mini end-to-end verification was skipped: its transformer service runs a prebuilt image, so it cannot verify this source edit in the sandbox. Targeted unit and component tests passed.
Developer checklist
Reviewer checklist