Skip to content

[eslint-monster] actions/setup/js: normalize caught-error logging to getErrorMessage #49667

Description

@github-actions

Summary

ESLint factory found a large cluster of gh-aw-custom/prefer-get-error-message-over-string warnings across actions/setup/js. These all point to the same root cause: caught errors are being stringified with String(err) even when getErrorMessage() is already available in scope.

Affected files

  • actions/setup/js/apply_safe_outputs_replay.cjs
  • actions/setup/js/apply_samples.cjs
  • actions/setup/js/artifact_client.cjs
  • actions/setup/js/build_checkout_manifest.cjs
  • actions/setup/js/check_workflow_recompile_needed.cjs
  • actions/setup/js/convert_gateway_config_shared.cjs
  • actions/setup/js/create_code_scanning_alert.cjs
  • actions/setup/js/create_pull_request.cjs
  • actions/setup/js/frontmatter_hash_pure.cjs
  • actions/setup/js/generate_aw_info.cjs
  • actions/setup/js/generate_git_bundle.cjs
  • actions/setup/js/generate_git_patch.cjs
  • actions/setup/js/generate_safe_outputs_tools.cjs
  • actions/setup/js/github_rate_limit_logger.cjs
  • actions/setup/js/handle_agent_failure.cjs
  • actions/setup/js/handle_detection_runs.cjs
  • actions/setup/js/handle_noop_message.cjs
  • actions/setup/js/install_frontmatter_skills.cjs
  • actions/setup/js/load_experiment_state_from_repo.cjs
  • actions/setup/js/mcp_scripts_config_loader.cjs
  • actions/setup/js/merge_remote_agent_github_folder.cjs
  • actions/setup/js/messages_core.cjs
  • actions/setup/js/mount_mcp_as_cli.cjs
  • actions/setup/js/parse_mcp_gateway_log.cjs
  • actions/setup/js/patch_awf_chroot_config.cjs
  • actions/setup/js/pick_experiment.cjs
  • actions/setup/js/push_repo_memory.cjs
  • actions/setup/js/push_to_pull_request_branch.cjs
  • actions/setup/js/route_slash_command.cjs
  • actions/setup/js/run_evals.cjs
  • actions/setup/js/runtime_import.cjs
  • actions/setup/js/safe_outputs_config.cjs
  • actions/setup/js/safe_outputs_handlers.cjs
  • actions/setup/js/safe_outputs_tools_loader.cjs
  • actions/setup/js/setup_comment_memory_files.cjs
  • actions/setup/js/setup_threat_detection.cjs
  • actions/setup/js/start_mcp_gateway.cjs
  • actions/setup/js/upload_artifact.cjs

Representative diagnostics

  • actions/setup/js/apply_safe_outputs_replay.cjs:76:63 — Use getErrorMessage(err) instead of String(err)
  • actions/setup/js/artifact_client.cjs:311:69 — Use getErrorMessage(err) instead of String(err)
  • actions/setup/js/create_pull_request.cjs:1217:68 — Use getErrorMessage(err) instead of String(err)
  • actions/setup/js/route_slash_command.cjs:41:82 — Use getErrorMessage(error) instead of String(error)

Expected outcome

Replace String(err)/String(error) with getErrorMessage(...) anywhere that helper is already imported or otherwise available in scope, while keeping behavior limited to actions/setup/js.

Checklist

  • Audit all gh-aw-custom/prefer-get-error-message-over-string findings in actions/setup/js
  • Replace each eligible String(err) / String(error) with getErrorMessage(...)
  • Keep changes scoped to actions/setup/js
  • Run npm run lint:setup-js

Generated by 🧹 ESLint Monster · gpt54 · 13.1 AIC · ⌖ 5.29 AIC · ⊞ 4.8K ·

  • expires on Aug 8, 2026, 2:16 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