Skip to content

fix: error handling in guardian handlers for forbidden depreated feature #1086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kushalshit27
Copy link
Contributor

@kushalshit27 kushalshit27 commented May 7, 2025

🔧 Changes

This pull request introduces error handling improvements across multiple handlers in the auth0 toolset to handle forbidden feature errors and enhance robustness. The changes include adding a new utility function isForbiddenFeatureError, updating the getType methods of several handlers, and improving logging for better debugging.

Error Handling Enhancements

  • New Utility Function: Added isForbiddenFeatureError identifying forbidden feature errors and log warnings.

  • Imports Standardization:

    • Added isForbiddenFeatureError imports to multiple handler files for consistent error handling:
      • guardianFactorProviders
      • guardianFactorTemplates
      • guardianFactors
      • guardianPhoneFactorMessageTypes
      • guardianPhoneFactorSelectedProvider

📚 References

🔬 Testing

Test pass ✅

📝 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)

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2025

Codecov Report

Attention: Patch coverage is 63.93443% with 22 lines in your changes missing coverage. Please review.

Project coverage is 80.04%. Comparing base (f52336b) to head (6b2bec5).

Files with missing lines Patch % Lines
...rc/tools/auth0/handlers/guardianFactorProviders.ts 52.63% 4 Missing and 5 partials ⚠️
...rc/tools/auth0/handlers/guardianFactorTemplates.ts 61.53% 2 Missing and 3 partials ⚠️
src/tools/auth0/handlers/guardianFactors.ts 60.00% 2 Missing and 2 partials ⚠️
.../auth0/handlers/guardianPhoneFactorMessageTypes.ts 71.42% 1 Missing and 1 partial ⚠️
...h0/handlers/guardianPhoneFactorSelectedProvider.ts 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1086      +/-   ##
==========================================
- Coverage   80.24%   80.04%   -0.20%     
==========================================
  Files         131      131              
  Lines        4815     4847      +32     
  Branches      939      949      +10     
==========================================
+ Hits         3864     3880      +16     
- Misses        554      562       +8     
- Partials      397      405       +8     

☔ View full report in Codecov by Sentry.
📢 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.

@kushalshit27 kushalshit27 marked this pull request as ready for review May 7, 2025 09:15
@kushalshit27 kushalshit27 requested a review from a team as a code owner May 7, 2025 09:15
@kushalshit27 kushalshit27 marked this pull request as draft May 7, 2025 09:16
@kushalshit27 kushalshit27 marked this pull request as ready for review May 7, 2025 09:45
@kushalshit27 kushalshit27 merged commit c97c897 into master May 8, 2025
8 checks passed
@kushalshit27 kushalshit27 deleted the DXCDT-994-DXCDT-997-patch-legacy-mfa-phone-provider-forbidden branch May 8, 2025 07:01
@kushalshit27 kushalshit27 mentioned this pull request May 8, 2025
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