Skip to content

fix: handle 403 entitlement errors for bot detection and captcha on export #1434

Draft
ankita10119 wants to merge 2 commits into
masterfrom
DXCDT-1689
Draft

fix: handle 403 entitlement errors for bot detection and captcha on export #1434
ankita10119 wants to merge 2 commits into
masterfrom
DXCDT-1689

Conversation

@ankita10119

Copy link
Copy Markdown
Contributor

🔧 Changes

Fixes 403 entitlement error handling for bot detection and captcha on export, in preparation for ROAD-8051 (free_bot_detection_deprecation FF).

Export (GET):

  • Decoupled botDetection.get() and captcha.get() into independent calls with independent error handling. Previously both were in a single Promise.all, a 403 on bot detection would silently discard captcha data even though captcha returned 200.
  • A 403 on either endpoint now logs a warning and skips that resource independently, without affecting the other.
  • Updated warning message to reference the tenant's plan rather than OAuth scopes.

Deploy (PATCH):

  • Bot detection and captcha 403s surface to the user as errors (per API team confirmation that PATCH 403 should not be handled gracefully).

📚 References

🔬 Testing

Unit tests cover:

  • GET 403 on bot detection - captcha data is preserved in the export
  • GET 403 on captcha - bot detection data is preserved in the export
  • Happy path export and import verified on real tenant

Real tenant 403 testing is pending entitlement access (requires free_bot_detection_deprecation FF + bot detection entitlement revoked)

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@ankita10119
ankita10119 requested a review from a team as a code owner July 24, 2026 11:18
@ankita10119
ankita10119 marked this pull request as draft July 24, 2026 11:18
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.

1 participant