Refactor error message extraction to use getErrorMessage helper#8000
Closed
Refactor error message extraction to use getErrorMessage helper#8000
Conversation
…in .cjs files Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Use getErrorMessage helper in .chs files for error messages
Refactor error message extraction to use getErrorMessage helper
Dec 28, 2025
Contributor
|
@copilot update setup.sh to copy the error message file |
…etup.sh Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Added |
Contributor
|
@copilot merge main |
- Resolved merge conflict in mcp_server_core.cjs by including both error_helpers.cjs and mcp_enhanced_errors.cjs imports - Added mcp_enhanced_errors.cjs to SAFE_INPUTS_FILES and SAFE_OUTPUTS_FILES in setup.sh Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Merged main branch (commit d7ea76f). Resolved merge conflict in |
Contributor
|
@copilot merge main and recompile |
- Resolved merge conflicts in check_permissions_utils.cjs and mcp_server_core.cjs - Moved error_helpers import to top of check_permissions_utils.cjs file - Kept getErrorMessage import in mcp_server_core.cjs as it's still used Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Removed outdated comment from dictation-prompt.lock.yml - Formatted devcontainer.json extensions array Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Contributor
|
@copilot merge main |
- Resolved conflicts in check_permissions_utils.cjs: kept getErrorMessage for outer catch, added TypeScript comments - Resolved conflicts in mcp_server_core.cjs: kept getErrorMessage import as it's still used - Merged log_parser_shared.cjs changes for type-safe string handling Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Copilot AI
added a commit
that referenced
this pull request
Dec 28, 2025
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pelikhan
pushed a commit
that referenced
this pull request
Dec 28, 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.
Plan: Use getErrorMessage helper in .cjs files
error instanceof Error ? error.message : String(error)pattern withgetErrorMessage(error)Summary of changes:
getErrorMessage(error)instead of manual error message extractionerror_helpers.cjsto all affected filesnew Function()oreval()to properly mock thegetErrorMessagefunctionsafe_inputs_mcp_server.test.cjsare pre-existingactions/setup/setup.shto includeerror_helpers.cjsandmcp_enhanced_errors.cjsin both SAFE_INPUTS_FILES and SAFE_OUTPUTS_FILES arrays@ts-expect-errorcomments where needed for type safetyLatest merge conflicts resolved:
check_permissions_utils.cjs: Added TypeScript comments for error handling, keptgetErrorMessagefor outer catch blockmcp_server_core.cjs: KeptgetErrorMessageimport as it's still used at lines 122 and 711log_parser_shared.cjs: Merged type-safe string handling for safe output fieldsOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.