Skip to content

fix(fb_custom_audience): classify Facebook error 613 as throttled - #5733

Merged
ItsSudip merged 3 commits into
developfrom
harness/INT-7447-fix-fb-custom-audience-classify-b05a0c1c
Oct 27, 2026
Merged

ItsSudip merged 3 commits into
developfrom
harness/INT-7447-fix-fb-custom-audience-classify-b05a0c1c

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

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.

⚠️ Known Issues

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

  • My code follows the style guidelines of this project
  • No breaking changes are being introduced.
  • All related docs linked with the PR? Graph API rate-limiting reference is linked in the handler.
  • All changes manually tested? Targeted unit and mocked component cases exercised the response.
  • Any documentation changes needed with this change? No.
  • Is the PR limited to 10 file changes?
  • Is the PR limited to one linear task?
  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?
  • Verified that there are no credentials or confidential data exposed with the changes.

@rudder-devbox

rudder-devbox Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from task INT-7447.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b6148ea4-78f9-4395-8029-e4d138ec021b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.40%. Comparing base (ac72877) to head (a073140).
⚠️ Report is 1 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ItsSudip
ItsSudip marked this pull request as ready for review October 27, 2026 05:17
@ItsSudip
ItsSudip requested review from a team as code owners October 27, 2026 05:17
Copilot AI balanced review requested due to automatic review settings October 27, 2026 05:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

Copilot AI balanced review requested due to automatic review settings October 27, 2026 05:19
@rudder-devbox

rudder-devbox Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow mapping change follows existing rate-limit handling and has targeted unit and component coverage, with no unresolved findings.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 27, 2026 05:25
@rudder-devbox

rudder-devbox Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow mapping change follows existing error handling, has focused regression coverage, and has no identified blocking issues.

No open issues 🎉

Review effort: Balanced

@ItsSudip
ItsSudip enabled auto-merge (squash) October 27, 2026 05:28
@sonarqubecloud

Copy link
Copy Markdown

@ItsSudip
ItsSudip merged commit e3aa7d6 into develop Oct 27, 2026
47 checks passed
@ItsSudip
ItsSudip deleted the harness/INT-7447-fix-fb-custom-audience-classify-b05a0c1c branch October 27, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants