-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Description
sphere-import -t order -p $SPHERE_PROJECT_KEY -f $jsonFile
Expected Behavior
exit with code 1 (or any non-zero) as the order does not exist!
Current Behavior
info: {
"errors": [
{
"order": {
"orderNumber": "B-258-254-111",
"lineItems": [
{
"id": "da9e02c4-7937-49c6-afbb-6da2601e43dd",
"state": [
{
"quantity": 1,
"fromState": "exported",
"toState": "open"
}
]
}
]
},
"error": {
"code": "ENOENT",
"name": "Error",
"message": "Order with orderNumber B-258-254-111 not found.",
"stack": "Error: Order with orderNumber B-258-254-111 not found.\n at /usr/local/lib/node_modules/sphere-node-cli/node_modules/@commercetools/orders-update/dist/orders-update.js:166:45\n at tryCatcher (/usr/local/lib/node_modules/sphere-node-cli/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/sphere-node-cli/node_modules/bluebird/js/release/promise.js:510:31)\n at Promise._settlePromise (/usr/local/lib/node_modules/sphere-node-cli/node_modules/bluebird/js/release/promise.js:567:18)\n at Promise._settlePromise0 (/usr/local/lib/node_modules/sphere-node-cli/node_modules/bluebird/js/release/promise.js:612:10)\n at Promise._settlePromises (/usr/local/lib/node_modules/sphere-node-cli/node_modules/bluebird/js/release/promise.js:691:18)\n at Async._drainQueue (/usr/local/lib/node_modules/sphere-node-cli/node_modules/bluebird/js/release/async.js:133:16)\n at Async._drainQueues (/usr/local/lib/node_modules/sphere-node-cli/node_modules/bluebird/js/release/async.js:143:10)\n at Immediate.Async.drainQueues (/usr/local/lib/node_modules/sphere-node-cli/node_modules/bluebird/js/release/async.js:17:14)\n at runCallback (timers.js:649:20)\n at tryOnImmediate (timers.js:622:5)\n at processImmediate [as _immediateCallback] (timers.js:594:5)"
}
}
],
"inserted": [],
"successfullImports": 0
}RETURN CODE: 0
Context
There is no way to find if the command succeeded or failed!
Possible Solution
The main module should exit with a non-zero code when a sub-module fails.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels