Skip to content

Add standardized error code to safe-outputs-mcp-server port validation - #55041

Draft
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/use-001-fix-port-validation-error
Draft

Add standardized error code to safe-outputs-mcp-server port validation#55041
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/use-001-fix-port-validation-error

Conversation

Copilot AI commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

safe-outputs-mcp-server.cjs threw an invalid-port error without a standardized error code prefix, causing the conformance checker to flag USE-001 (missing standardized error codes).

Changes

  • Imported the existing ERR_CONFIG code from error_codes.cjs — already the established convention for configuration/startup failures across the codebase (e.g. create_files.cjs, create_prompt.cjs, check_command_position.cjs)
  • Prefixed the GH_AW_SAFE_OUTPUTS_PORT validation error with ERR_CONFIG:

No new error code was introduced since ERR_CONFIG already precisely matches this case's category ("configuration errors: missing env vars, bad setup").

throw new Error(`${ERR_CONFIG}: GH_AW_SAFE_OUTPUTS_PORT must be a valid port number`);

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing standardized error code for port-validation error Add standardized error code to safe-outputs-mcp-server port validation Aug 23, 2026
Copilot AI requested a review from pelikhan August 23, 2026 07:48
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.

[Safe Outputs Conformance] USE-001: safe-outputs-mcp-server.cjs port-validation error missing standardized error code

2 participants