gh-aw icon indicating copy to clipboard operation
gh-aw copied to clipboard

[Safe Outputs Conformance] USE-001: azure_devops_work_items.cjs missing standardized error codes

Open github-actions[bot] opened this issue 2 months ago • 2 comments

Conformance Check Failure

Check ID: USE-001 Severity: LOW Category: Usability

Problem Description

actions/setup/js/azure_devops_work_items.cjs throws numerous Error instances (input validation, HTTP failures, work-item resolution failures) but none of them use a standardized error code prefix (E\d{3}, ERROR_, or ERR_). All other safe-output handlers in the catalog reference the standardized E001-E010 error code catalog (see SEC-006), so this handler is inconsistent with the rest of the codebase and harder for callers/agents to programmatically distinguish error classes.

Affected Components

  • Files: actions/setup/js/azure_devops_work_items.cjs
🔍 Current vs Expected Behavior

Current Behavior

Errors are thrown as plain messages, e.g.:

throw new Error("assignee must not be empty");
throw new Error(`AZURE_DEVOPS_ORG_URL must be a valid HTTPS URL`);
throw new Error(`Azure DevOps ${method} request failed with HTTP ${response.status} ${response.statusText}`);

Expected Behavior

Error messages should be prefixed with (or otherwise include) a standardized error code from the E001-E010 catalog referenced by the specification, consistent with other handlers, e.g. throw new Error("E002: assignee must not be empty").

Remediation Steps

This task can be assigned to a Copilot coding agent with the following steps:

  1. Review the standardized error code catalog (E001-E010) referenced in docs/src/content/docs/specs/safe-outputs-specification.md (Section 9.5) and how other handlers in actions/setup/js/*.cjs apply it.
  2. Update the throw new Error(...) call sites in actions/setup/js/azure_devops_work_items.cjs to include the appropriate standardized error code prefix for each error class (validation errors, network/HTTP errors, resolution errors, etc.), matching the convention used by comparable handlers.
  3. Keep existing error message text intact aside from adding the code prefix, to avoid breaking any callers that pattern-match on message substrings.

Verification

After remediation, verify the fix by running:

bash scripts/check-safe-outputs-conformance.sh

USE-001 should no longer flag actions/setup/js/azure_devops_work_items.cjs.

References

  • Safe Outputs Specification: docs/src/content/docs/specs/safe-outputs-specification.md
  • Conformance Checker: scripts/check-safe-outputs-conformance.sh
  • Run: §36221596011
  • Date: 2026-09-26

Generated by ✅ Daily Safe Outputs Conformance Checker · claude · agent · 106.4 AIC · ⌖ 7.66 AIC · ⊞ 7.6K · ◷

  • [x] expires on Sep 26, 2026, 9:50 PM UTC-08:00

github-actions[bot] avatar Sep 26 '26 05:09 github-actions[bot]

If this issue gets approved, could it be assigned to me?

Fayupable avatar Sep 26 '26 15:09 Fayupable

This issue is being closed as outdated. A newer issue has been created: #63790

View newer issue


This action was performed automatically by the Daily Safe Outputs Conformance Checker workflow.

github-actions[bot] avatar Sep 27 '26 05:09 github-actions[bot]