Skip to content

fix: remove unnecessary try/catch W-22049636#398

Merged
WillieRuemmele merged 2 commits intomainfrom
er/ImproveErrorHandlingOnPublish
Apr 21, 2026
Merged

fix: remove unnecessary try/catch W-22049636#398
WillieRuemmele merged 2 commits intomainfrom
er/ImproveErrorHandlingOnPublish

Conversation

@EstebanRomero84
Copy link
Copy Markdown
Contributor

What does this PR do?

Removes a redundant try/catch block. By eliminating this, we ensure that error actions are no longer suppressed.

What issues does this PR fix or reference?

@W-22049636@

@EstebanRomero84 EstebanRomero84 changed the title fix: remove unnecessary try/catch fix: remove unnecessary try/catch W-22049636 Apr 21, 2026
@WillieRuemmele
Copy link
Copy Markdown
Contributor

QA Notes


✅ : we throw all SfErrors no need to re-catch/wrap/throw - it also loses actions
✅ :

../../oss/plugin-agent/bin/run.js agent publish authoring-bundle -o nga-prod-eca
? API name of the authoring bundle to publish Local_Info_Agent
Error (ApiAccessError): Error obtaining API token: invalid or missing access token.


Try this:

If using your own connected app or ECA, ensure it grants access to the SFAP APIs by providing these scopes:
   * Access chatbot services (chatbot_api)
   * Access the Salesforce API Platform (sfap_api)
   * Manage user data via Web browsers (web)

instead of:

../../oss/plugin-agent/bin/run.js agent publish authoring-bundle -o nga-prod-eca
? API name of the authoring bundle to publish Local_Info_Agent

 ──────────────── Publishing Agent ────────────────

 ✘ Validate Bundle 475ms
 ◼ Publish Agent
 ◼ Retrieve Metadata
 ◼ Deploy Metadata

 Agent Name: Local_Info_Agent
 Elapsed Time: 480ms

Error (ApiAccessError): Error obtaining API token: invalid or missing access token.

@WillieRuemmele WillieRuemmele merged commit 278ddf1 into main Apr 21, 2026
13 of 15 checks passed
@WillieRuemmele WillieRuemmele deleted the er/ImproveErrorHandlingOnPublish branch April 21, 2026 17:13
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