Improve error handling, logging, and maintainability#20
Merged
sellakumaran merged 3 commits intomainfrom Nov 15, 2025
Merged
Conversation
Enhanced error handling across multiple components, including `PublishCommand` and `SetupCommand`, with better logging and detailed troubleshooting steps. Introduced a centralized `ErrorCodes` class for consistent error management. Refactored exceptions to use `ErrorCodes` and improved user guidance in `AzureExceptions` and `PythonLocatorException`. Removed redundant console color manipulation in `Program.cs` for cleaner output. Added `PythonLocator` utility for robust Python environment detection and integrated it into `PythonBuilder`. Updated `InteractiveGraphAuthService` to include new permissions for inheritable configurations. Enhanced `ConfigurationWizardService` with domain extraction and stricter validation for web app names. Removed deprecated methods and tests, focusing on `CreateOrUpdateBotWithAgentBlueprintAsync`. Added unit tests for new utilities and validation logic. Performed general code cleanup, improving clarity and maintainability.
mengyimicro
previously approved these changes
Nov 15, 2025
tmlsousa
reviewed
Nov 15, 2025
tmlsousa
reviewed
Nov 15, 2025
tmlsousa
reviewed
Nov 15, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/A365SetupRunner.cs
Outdated
Show resolved
Hide resolved
tmlsousa
reviewed
Nov 15, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Outdated
Show resolved
Hide resolved
tmlsousa
reviewed
Nov 15, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Outdated
Show resolved
Hide resolved
tmlsousa
previously approved these changes
Nov 15, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/Helpers/PythonLocator.cs
Show resolved
Hide resolved
Removed unused methods `ConvertToDeploymentConfig` and `GetWellKnownResourceName` to streamline `SetupCommand`. Introduced `DeployAppException` for improved error handling during app deployment, replacing generic exceptions. Added a new error code `DeploymentAppFailed` to support this. Updated `A365SetupRunner` to use a centralized documentation message for better maintainability. Modified default domain handling in `ConfigurationWizardService` to return an empty string instead of `"onmicrosoft.com"`. Standardized UPN format with `UPN.` prefix. Reordered imports in `DeploymentService` for consistency. Removed redundant comments in `InteractiveGraphAuthService`. Updated test cases to align with domain handling changes.
a8d42c5
mengyimicro
approved these changes
Nov 15, 2025
tmlsousa
approved these changes
Nov 15, 2025
sellakumaran
added a commit
that referenced
this pull request
Feb 27, 2026
* Improve error handling, logging, and maintainability Enhanced error handling across multiple components, including `PublishCommand` and `SetupCommand`, with better logging and detailed troubleshooting steps. Introduced a centralized `ErrorCodes` class for consistent error management. Refactored exceptions to use `ErrorCodes` and improved user guidance in `AzureExceptions` and `PythonLocatorException`. Removed redundant console color manipulation in `Program.cs` for cleaner output. Added `PythonLocator` utility for robust Python environment detection and integrated it into `PythonBuilder`. Updated `InteractiveGraphAuthService` to include new permissions for inheritable configurations. Enhanced `ConfigurationWizardService` with domain extraction and stricter validation for web app names. Removed deprecated methods and tests, focusing on `CreateOrUpdateBotWithAgentBlueprintAsync`. Added unit tests for new utilities and validation logic. Performed general code cleanup, improving clarity and maintainability. * Fix test failures * Refactor and enhance deployment and configuration logic Removed unused methods `ConvertToDeploymentConfig` and `GetWellKnownResourceName` to streamline `SetupCommand`. Introduced `DeployAppException` for improved error handling during app deployment, replacing generic exceptions. Added a new error code `DeploymentAppFailed` to support this. Updated `A365SetupRunner` to use a centralized documentation message for better maintainability. Modified default domain handling in `ConfigurationWizardService` to return an empty string instead of `"onmicrosoft.com"`. Standardized UPN format with `UPN.` prefix. Reordered imports in `DeploymentService` for consistency. Removed redundant comments in `InteractiveGraphAuthService`. Updated test cases to align with domain handling changes.
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.
Enhanced error handling across multiple components, including
PublishCommandandSetupCommand, with better logging and detailed troubleshooting steps. Introduced a centralizedErrorCodesclass for consistent error management.Refactored exceptions to use
ErrorCodesand improved user guidance inAzureExceptionsandPythonLocatorException. Removed redundant console color manipulation inProgram.csfor cleaner output.Added
PythonLocatorutility for robust Python environment detection and integrated it intoPythonBuilder. UpdatedInteractiveGraphAuthServiceto include new permissions for inheritable configurations.Enhanced
ConfigurationWizardServicewith domain extraction and stricter validation for web app names. Removed deprecated methods and tests, focusing onCreateOrUpdateBotWithAgentBlueprintAsync.Added unit tests for new utilities and validation logic. Performed general code cleanup, improving clarity and maintainability.