Merged
Conversation
Contributor
Josina20
commented
Nov 15, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances exception handling for Azure authorization failures by introducing a centralized ExceptionHandler utility class and implementing specific handling for AuthorizationFailed errors from Azure CLI commands. The changes improve error reporting consistency and user experience when encountering permission issues during setup.
Key Changes:
- Extracted exception handling logic from
Program.csinto a new reusableExceptionHandlerclass - Added specific detection and handling for Azure authorization failures in setup operations
- Enhanced error messages to guide users on permission requirements (subscription or resource group level)
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Exceptions/ExceptionHandler.cs |
New centralized utility class for handling Agent365Exception with consistent console output and logging |
Services/A365SetupRunner.cs |
Added authorization failure detection in webapp creation and AzWarnAsync method |
Program.cs |
Refactored exception handler to use new utility class; configured logging to exclude Error/Fatal from console |
Exceptions/AzureExceptions.cs |
Updated mitigation message to clarify that Contributor/Owner role can be at resource group level |
Commands/SetupCommand.cs |
Added try-catch block for Agent365Exception with centralized handling |
src/Microsoft.Agents.A365.DevTools.Cli/Exceptions/ExceptionHandler.cs
Outdated
Show resolved
Hide resolved
sellakumaran
previously approved these changes
Nov 15, 2025
sellakumaran
approved these changes
Nov 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.