Skip to content

[eslint-monster] [lint-monster] setup/js: normalize unsafe caught/rejected error property access #43633

Description

@github-actions

Scope

Remediate unsafe error-handling diagnostics under actions/setup/js, especially direct property access on unknown caught or rejected values and cases that should use getErrorMessage(...).

Affected files

  • actions/setup/js/check_membership.cjs
  • actions/setup/js/check_permissions_utils.cjs
  • actions/setup/js/check_team_member.cjs
  • actions/setup/js/check_version_updates.cjs
  • actions/setup/js/checkout_pr_branch.cjs
  • actions/setup/js/claude_harness.cjs
  • actions/setup/js/codex_harness.cjs
  • actions/setup/js/collect_ndjson_output.cjs
  • actions/setup/js/create_pull_request.cjs
  • actions/setup/js/load_experiment_state_from_repo.cjs
  • actions/setup/js/mcp_cli_bridge.cjs
  • actions/setup/js/mcp_dependencies_manager.cjs
  • actions/setup/js/mount_mcp_as_cli.cjs
  • actions/setup/js/push_repo_memory.cjs
  • actions/setup/js/safe_outputs_handlers.cjs
  • actions/setup/js harness/parser/helper files with the same pattern

Representative diagnostics

  • check_membership.cjs:150 — direct access to .message on caught error is unsafe.
  • checkout_pr_branch.cjs:160 — direct access to .status on caught error is unsafe.
  • claude_harness.cjs:558 — direct access to .message on promise rejection is unsafe.
  • check_team_member.cjs:32 — prefer getErrorMessage(repoError).
  • create_pull_request.cjs:233 — prefer getErrorMessage(retryError).

Expected outcome

Error handling in setup runtime scripts should narrow unknown thrown values safely, prefer shared helpers from error_helpers.cjs, and avoid direct .message, .status, .name, or similar property reads on untyped caught/rejected values.

Checklist

  • Replace direct caught/rejected property access with guarded narrowing or helper usage
  • Prefer getErrorMessage(...) where the linter recommends it
  • Keep changes scoped to actions/setup/js
  • Run npm run lint:setup-js

Generated by 🧹 ESLint Monster · 18.5 AIC · ⌖ 7.96 AIC · ⊞ 1.5K ·

  • expires on Jul 12, 2026, 2:18 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions