Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrap-error-like-objects #1108

Merged
merged 3 commits into from
Jul 22, 2024
Merged

fix: wrap-error-like-objects #1108

merged 3 commits into from
Jul 22, 2024

Conversation

mshanemc
Copy link
Contributor

What does this PR do?

spreading an error, like https://github.com/salesforcecli/plugin-deploy-retrieve/blob/af41a48180f944e01f1c5e0b8ad79148b89c90c2/src/commands/project/deploy/quick.ts#L132 will pass a param that is not an instance of SfError which cause SfError.wrap to wrap it in another error. The human output doesn't show the wrapped error, which makes it harder for users to know what's wrong.

What issues does this PR fix or reference?

forcedotcom/cli#2962
@W-16297490@

@mshanemc mshanemc requested a review from a team as a code owner July 22, 2024 17:24
@mshanemc mshanemc changed the title Sm/wrap-error-like-objects fix: wrap-error-like-objects Jul 22, 2024
@mdonnalley
Copy link
Contributor

QA

setup:

  • checkout and build branch
  • link to PDR
  • link PDR to sf
  • cd to dreamhouse-lwc and create scratch org
  • sf project deploy validate --source-dir force-app/main/default/classes
  • sf project deploy start --source-dir force-app/main/default/classes
  • sf project deploy quick --job-id 0AfO300000EhvJAKAZ (id from validate output)

🟢 fails with expected error

Error (CannotQuickDeployError): Job ID can't be used for quick deployment. Possible reasons include the deployment hasn't been validated, has already been deployed, or the validation expired because you ran it more than 10 days ago.

@mdonnalley mdonnalley merged commit e0c5eca into main Jul 22, 2024
76 checks passed
@mdonnalley mdonnalley deleted the sm/wrap-error-like-objects branch July 22, 2024 19:24
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.

3 participants