@pintahub/shopify-api 1.4.7 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.UpdateProduct = void 0;
|
|
24
24
|
const ActionBuilder_1 = require("../../ActionBuilder");
|
|
25
25
|
const getGlobalID_1 = require("../../../utils/getGlobalID");
|
|
26
|
+
const handleErrors_1 = require("../../../utils/handleErrors");
|
|
26
27
|
class UpdateProduct extends ActionBuilder_1.ActionBuilder {
|
|
27
28
|
run(args) {
|
|
28
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -52,7 +53,8 @@ class UpdateProduct extends ActionBuilder_1.ActionBuilder {
|
|
|
52
53
|
input: newArgs
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
|
-
const { data } = Object.assign({}, result);
|
|
56
|
+
const { data, errors } = Object.assign({}, result);
|
|
57
|
+
yield (0, handleErrors_1.handleErrors)(errors);
|
|
56
58
|
const { productUpdate } = Object.assign({}, data);
|
|
57
59
|
const { product } = Object.assign({}, productUpdate);
|
|
58
60
|
return Object.assign({}, product);
|