Replace help_url_anchor with error_code in error message URLs#237
Merged
cleemullins merged 2 commits intomainfrom Nov 11, 2025
Merged
Replace help_url_anchor with error_code in error message URLs#237cleemullins merged 2 commits intomainfrom
cleemullins merged 2 commits intomainfrom
Conversation
Co-authored-by: cleemullins <1165321+cleemullins@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update error links to use error code instead of help anchor
Replace help_url_anchor with error_code in error message URLs
Nov 11, 2025
cleemullins
approved these changes
Nov 11, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors error message URL generation to use error codes directly as URL anchors instead of static anchor strings. This simplifies maintenance by eliminating the need to maintain separate anchor text for each error message and enables direct linking to specific error codes in documentation.
- Removed
help_url_anchorparameter fromErrorMessageclass constructor - Updated URL generation to use error codes:
https://aka.ms/M365AgentsErrorCodes/#-60000 - Updated 77 error message instantiations across 7 libraries and corresponding test assertions
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/errors/error_message.py | Removed help_url_anchor parameter and updated URL generation to use error code directly |
| tests/hosting_core/errors/test_error_resources.py | Updated test instantiations and assertions to validate new URL format using error codes |
| libraries/microsoft-agents-authentication-msal/microsoft_agents/authentication/msal/errors/error_resources.py | Removed third parameter from 9 error message instantiations |
| libraries/microsoft-agents-storage-cosmos/microsoft_agents/storage/cosmos/errors/error_resources.py | Removed third parameter from 13 error message instantiations |
| libraries/microsoft-agents-storage-blob/microsoft_agents/storage/blob/errors/error_resources.py | Removed third parameter from 4 error message instantiations |
| libraries/microsoft-agents-hosting-teams/microsoft_agents/hosting/teams/errors/error_resources.py | Removed third parameter from 10 error message instantiations |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/errors/error_resources.py | Removed third parameter from 28 error message instantiations |
| libraries/microsoft-agents-copilotstudio-client/microsoft_agents/copilotstudio/client/errors/error_resources.py | Removed third parameter from 7 error message instantiations |
| libraries/microsoft-agents-activity/microsoft_agents/activity/errors/error_resources.py | Removed third parameter from 6 error message instantiations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rodrigobr-msft
approved these changes
Nov 11, 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.
Error messages were generating help URLs using a static anchor text parameter. This required maintaining separate anchor strings for each error and prevented direct linking to specific error codes.
Changes
ErrorMessage class (
error_message.py)help_url_anchorparameter from constructorhttps://aka.ms/M365AgentsErrorCodes/#-60000Error resources (7 libraries, 77 error messages)
ErrorMessage()instantiationsBefore/After
Affected libraries: authentication-msal, storage-cosmos, storage-blob, hosting-teams, activity, copilotstudio-client, hosting-core.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.