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

force:data:bulk:delete command return value=0 even on error #1648

Closed
yurifugi opened this issue Jul 28, 2022 · 3 comments
Closed

force:data:bulk:delete command return value=0 even on error #1648

yurifugi opened this issue Jul 28, 2022 · 3 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@yurifugi
Copy link

yurifugi commented Jul 28, 2022

I'm using sfdx-cli/7.159.0 linux-x64 node-v16.15.1 and trying some bulk:deletes.

Noticed that even when the command fails -in my case it is failing because of API limits exceeded- the return value ($?) is 0 (zero). Should not the return value ($?) be 0 (zero) on success?

Outputs:

$ sfdx force:data:bulk:delete \
>             --csvfile "$CSVFILE" \
>             --sobjecttype "$SOBJECT" \
>             --targetusername "$ORG_USER" \
>             --wait 300
Bulk Delete... Error
ExceededQuota: ApiBatchItems Limit exceeded.
    at BulkApi.getError (/home/yuri/.local/share/sfdx/client/7.159.0-f8fac41/node_modules/jsforce/lib/http-api.js:307:12)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /home/yuri/.local/share/sfdx/client/7.159.0-f8fac41/node_modules/jsforce/lib/http-api.js:154:23
    at async /home/yuri/.local/share/sfdx/client/7.159.0-f8fac41/node_modules/jsforce/lib/api/bulk.js:428:21 {
  errorCode: 'ExceededQuota',
  content: undefined
}

$ echo "$?"
0

Thanks in advance.

@peternhale peternhale added the investigating We're actively investigating this issue label Jul 28, 2022
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@peternhale peternhale added the bug Issue or pull request that identifies or fixes a bug label Jul 28, 2022
@git2gus
Copy link

git2gus bot commented Jul 28, 2022

This issue has been linked to a new work item: W-11509580

@shetzel
Copy link
Contributor

shetzel commented Jul 6, 2023

This is now in the latest CLIs: sfdx 7.208.10 / sf 1.85.8

@shetzel shetzel closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

3 participants