Skip to content

Improve error handling, logging, and maintainability#20

Merged
sellakumaran merged 3 commits intomainfrom
users/sellak/testingAllCommands
Nov 15, 2025
Merged

Improve error handling, logging, and maintainability#20
sellakumaran merged 3 commits intomainfrom
users/sellak/testingAllCommands

Conversation

@sellakumaran
Copy link
Contributor

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.

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.
@sellakumaran sellakumaran requested review from a team as code owners November 15, 2025 19:25
mengyimicro
mengyimicro previously approved these changes Nov 15, 2025
tmlsousa
tmlsousa previously approved these changes Nov 15, 2025
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.
@sellakumaran sellakumaran dismissed stale reviews from tmlsousa and mengyimicro via a8d42c5 November 15, 2025 21:32
@sellakumaran sellakumaran merged commit f5679aa into main Nov 15, 2025
2 checks passed
@sellakumaran sellakumaran deleted the users/sellak/testingAllCommands branch November 15, 2025 22:01
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.
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