@pintahub/shopify-api 1.3.8 → 1.3.9

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.
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateProductMedia = void 0;
13
13
  const ActionBuilder_1 = require("../../ActionBuilder");
14
14
  const getGlobalID_1 = require("../../../utils/getGlobalID");
15
+ const handleErrors_1 = require("../../../utils/handleErrors");
15
16
  class CreateProductMedia extends ActionBuilder_1.ActionBuilder {
16
17
  run(args) {
17
18
  return __awaiter(this, void 0, void 0, function* () {
@@ -37,11 +38,12 @@ class CreateProductMedia extends ActionBuilder_1.ActionBuilder {
37
38
  const result = yield this.client.request(query, {
38
39
  variables: {
39
40
  productId: gId,
40
- media,
41
+ media
41
42
  }
42
43
  });
43
- console.log('result', JSON.stringify(result, null, 2));
44
- return {};
44
+ const { data, errors } = Object.assign({}, result);
45
+ yield (0, handleErrors_1.handleErrors)(errors);
46
+ return data;
45
47
  });
46
48
  }
47
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pintahub/shopify-api",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",