@pintahub/shopify-api 1.5.0 → 1.5.2
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.
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SearchProducts = void 0;
|
|
13
13
|
const ActionBuilder_1 = require("../../ActionBuilder");
|
|
14
|
+
const handleErrors_1 = require("../../../utils/handleErrors");
|
|
14
15
|
class SearchProducts extends ActionBuilder_1.ActionBuilder {
|
|
15
16
|
run(args) {
|
|
16
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -33,7 +34,8 @@ class SearchProducts extends ActionBuilder_1.ActionBuilder {
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
`;
|
|
36
|
-
const { data } = yield this.client.request(query);
|
|
37
|
+
const { data, errors } = yield this.client.request(query);
|
|
38
|
+
yield (0, handleErrors_1.handleErrors)(errors);
|
|
37
39
|
const { products } = Object.assign({}, data);
|
|
38
40
|
const { nodes, pageInfo } = Object.assign({}, products);
|
|
39
41
|
const items = Array.isArray(nodes) ? nodes : [];
|