Normalize setup-js caught-error logging to use getErrorMessage - #49686
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Normalizes caught-error formatting across actions/setup/js using the shared getErrorMessage() helper.
Changes:
- Replaces
String(err)andString(error)in 38 setup modules. - Standardizes filesystem, API, gateway, artifact, and command-routing errors.
- Preserves existing causes, control flow, and scope.
Show a summary per file
| File | Description |
|---|---|
actions/setup/js/apply_safe_outputs_replay.cjs |
Normalizes replay filesystem errors. |
actions/setup/js/apply_samples.cjs |
Normalizes sample replay failures. |
actions/setup/js/artifact_client.cjs |
Normalizes artifact directory errors. |
actions/setup/js/build_checkout_manifest.cjs |
Normalizes manifest filesystem errors. |
actions/setup/js/check_workflow_recompile_needed.cjs |
Normalizes file-read errors. |
actions/setup/js/convert_gateway_config_shared.cjs |
Normalizes gateway output errors. |
actions/setup/js/create_code_scanning_alert.cjs |
Normalizes SARIF write errors. |
actions/setup/js/create_pull_request.cjs |
Normalizes branch and patch errors. |
actions/setup/js/frontmatter_hash_pure.cjs |
Normalizes frontmatter read errors. |
actions/setup/js/generate_aw_info.cjs |
Normalizes info-file errors. |
actions/setup/js/generate_git_bundle.cjs |
Normalizes bundle directory errors. |
actions/setup/js/generate_git_patch.cjs |
Normalizes patch filesystem errors. |
actions/setup/js/generate_safe_outputs_tools.cjs |
Normalizes tool-generation write errors. |
actions/setup/js/github_rate_limit_logger.cjs |
Normalizes logger directory errors. |
actions/setup/js/handle_agent_failure.cjs |
Normalizes template-read errors. |
actions/setup/js/handle_detection_runs.cjs |
Normalizes detection template errors. |
actions/setup/js/handle_noop_message.cjs |
Normalizes no-op template errors. |
actions/setup/js/install_frontmatter_skills.cjs |
Normalizes skill installation errors. |
actions/setup/js/load_experiment_state_from_repo.cjs |
Normalizes experiment-state errors. |
actions/setup/js/mcp_scripts_config_loader.cjs |
Normalizes MCP config read errors. |
actions/setup/js/merge_remote_agent_github_folder.cjs |
Normalizes merge and entrypoint errors. |
actions/setup/js/messages_core.cjs |
Normalizes message-template errors. |
actions/setup/js/mount_mcp_as_cli.cjs |
Normalizes MCP CLI directory errors. |
actions/setup/js/parse_mcp_gateway_log.cjs |
Normalizes gateway log errors. |
actions/setup/js/patch_awf_chroot_config.cjs |
Normalizes chroot config errors. |
actions/setup/js/pick_experiment.cjs |
Normalizes experiment persistence errors. |
actions/setup/js/push_repo_memory.cjs |
Normalizes repo-memory read errors. |
actions/setup/js/push_to_pull_request_branch.cjs |
Normalizes patch-read errors. |
actions/setup/js/route_slash_command.cjs |
Normalizes routing warnings and failures. |
actions/setup/js/run_evals.cjs |
Normalizes evaluation filesystem errors. |
actions/setup/js/runtime_import.cjs |
Normalizes runtime cache errors. |
actions/setup/js/safe_outputs_config.cjs |
Normalizes output-directory errors. |
actions/setup/js/safe_outputs_handlers.cjs |
Normalizes handler filesystem errors. |
actions/setup/js/safe_outputs_tools_loader.cjs |
Normalizes output append errors. |
actions/setup/js/setup_comment_memory_files.cjs |
Normalizes comment-memory errors. |
actions/setup/js/setup_threat_detection.cjs |
Normalizes threat-detection errors. |
actions/setup/js/start_mcp_gateway.cjs |
Normalizes gateway filesystem errors. |
actions/setup/js/upload_artifact.cjs |
Normalizes artifact staging errors. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 38/38 changed files
- Comments generated: 0
- Review effort level: Balanced
|
Great work on normalizing the error-handling patterns across One thing that would strengthen this PR:
The PR is otherwise ready to go — good description, focused changes, and aligned with the project's error-handling conventions.
|
|
@copilot quick triage for this PR:
Run details: https://github.com/github/gh-aw/actions/runs/30727625239
|
Re-ran triage on the current head (
So: not all remaining blockers are maintainer-only. The remaining non-maintainer blocker I found is the unrelated local |
|
@copilot quick triage for this PR:
Run details: https://github.com/github/gh-aw/actions/runs/30731801766
|
Re-ran triage on the current head (
So yes: all remaining blockers are maintainer-only. I do not see any remaining in-scope PR blockers on the current head; what remains is GitHub-side workflow/check state and any maintainer re-trigger/approval needed to get fresh CI on this head. |
🔍 Triage Summary
Normalizes error logging via getErrorMessage across setup-js. CI green, reviewer commented (no blocking issues). Automated triage — see the triage report for full context.
|
This change addresses the ESLint cluster in
actions/setup/jswhere caught errors were still stringified withString(err)/String(error)despitegetErrorMessage()already being available in scope. The update makes error-message formatting consistent across the affected setup scripts without expanding scope beyondactions/setup/js.Scope
actions/setup/jsmodules called out by the issue.getErrorMessage(...)was already imported or otherwise available.What changed
String(...).Behavioral effect
String(...)coercion in caught-error paths, aligning these files with the repository’s preferred error-message handling.Representative change
Areas touched