Skip to content

Conversation

@aviatco
Copy link
Collaborator

@aviatco aviatco commented Dec 23, 2025

📥 Pull Request

✨ Description of new changes

🎯 Problem
When creating Managed Private Endpoints (MPE), if the MPE creator lacks sufficient Azure permissions to access the target Azure resource, the CLI would fail the entire operation instead of providing clear feedback and gracefully handling the scenario.

🔧 Solution
Enhanced error handling in the MPE creation flow to gracefully handle Azure permission issues and provide better user experience:

Key Changes:

Enhanced Exception Handling in fab_fs_mkdir_managedprivateendpoint.py:
Improved User Messaging:

Instead of failing, the CLI now sets the MPE state to "Pending" when Azure access is forbidden
Clear message indicating the MPE was created but requires approval: "'<mpe_name>' created. Pending approval on Azure side"
Comprehensive Test Coverage in test_mkdir.py:

Added test_mkdir_managed_private_endpoint_forbidden_azure_access_pending_success() test
Mocks Azure forbidden exceptions to verify proper handling
Validates that the operation succeeds with appropriate messaging

Behavior Changes:

Before
❌ Operation fails with Azure permission error
After
✅ xxx.ManagedPrivateEndpoint created. Pending approval on Azure side

@aviatco aviatco requested a review from a team as a code owner December 23, 2025 16:02
@ayeshurun ayeshurun changed the title fix: Improve the error message shown when the MPE creator lacks Azure perm… fix: Improve the error message shown when the MPE creator lacks Azure permissions Dec 23, 2025
ayeshurun
ayeshurun previously approved these changes Dec 24, 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.

[FEATURE] Improve MPE creation experience when user lacks AuthZ on target Azure resource

2 participants