Skip to content

Comments

fix: fix --json error output to remove color info @W-21312816@#335

Merged
EstebanRomero84 merged 5 commits intomainfrom
wr/fixJsonError
Feb 20, 2026
Merged

fix: fix --json error output to remove color info @W-21312816@#335
EstebanRomero84 merged 5 commits intomainfrom
wr/fixJsonError

Conversation

@WillieRuemmele
Copy link
Contributor

@WillieRuemmele WillieRuemmele commented Feb 19, 2026

What does this PR do?

cleans up --json output

{
  "name": "CompileAgentScriptError",
  "message": "SyntaxError: Unexpected 'messaasdfges' [Ln 3, Col 4]",
  "exitCode": 1,
  "context": "AgentValidateAuthoringBundle",
  "data": {
    "errors": [
      {
        "errorType": "SyntaxError",
        "description": "Unexpected 'messaasdfges'",
        "lineStart": 3,
        "lineEnd": 3,
        "colStart": 4,
        "colEnd": 16
      }
    ]
  },

instead of

{
  "name": "Error",
  "message": "Compilation of the Agent Script file failed with the following errors:\n- \u001b[31mSyntaxError\u001b[39m: Unexpected 'messaasdfges' [Ln 3, Col 4]",
  "exitCode": 1,
  "context": "AgentValidateAuthoringBundle",
  "stack": "Error: Compilation of the Agent Script file failed with the following errors:\n- \u001b[31mSyntaxError\u001b[39m: Unexpected 'messaasdfges' [Ln 3, Col 4]\n    at SfCommandError.from (file:///Users/william.ruemmele/.nvm/versions/node/v24.12.0/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/SfCommandError.js:48:16)\n    at AgentValidateAuthoringBundle.catch (file:///Users/william.ruemmele/.nvm/versions/node/v24.12.0/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/sfCommand.js:332:47)\n    at AgentValidateAuthoringBundle._run (/Users/william.ruemmele/.nvm/versions/node/v24.12.0/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:186:29)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Config.runCommand (/Users/william.ruemmele/.nvm/versions/node/v24.12.0/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:456:25)\n    at async run (/Users/william.ruemmele/.nvm/versions/node/v24.12.0/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:97:16)\n    at async file:///Users/william.ruemmele/.nvm/versions/node/v24.12.0/lib/node_modules/@salesforce/cli/bin/run.js:15:1",
  "cause":

creates unified exit codes
requires: forcedotcom/agents#219

What issues does this PR fix or reference?

@W-21312816@

@EstebanRomero84 EstebanRomero84 merged commit 2eb98d3 into main Feb 20, 2026
15 checks passed
@EstebanRomero84 EstebanRomero84 deleted the wr/fixJsonError branch February 20, 2026 23:53
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.

2 participants