@wix/sdk 1.14.3 → 1.14.4

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.
@@ -36,8 +36,16 @@ export function servicePluginsModules(authStrategy) {
36
36
  async processRequest(request) {
37
37
  const url = request.url;
38
38
  const body = await request.text();
39
- const implMethodResult = await this.process({ url, body });
40
- return Response.json(implMethodResult);
39
+ try {
40
+ const implMethodResult = await this.process({ url, body });
41
+ return Response.json(implMethodResult);
42
+ }
43
+ catch (err) {
44
+ if (err.errorType === 'SPI' && err.applicationCode && err.httpCode) {
45
+ return Response.json({ applicationError: { code: err.applicationCode, data: err.data } }, { status: err.httpCode });
46
+ }
47
+ throw err;
48
+ }
41
49
  },
42
50
  async executeHandler(servicePluginRequest, url) {
43
51
  const componentType = servicePluginRequest.metadata.appExtensionType.toLowerCase();
@@ -41,8 +41,16 @@ function servicePluginsModules(authStrategy) {
41
41
  async processRequest(request) {
42
42
  const url = request.url;
43
43
  const body = await request.text();
44
- const implMethodResult = await this.process({ url, body });
45
- return Response.json(implMethodResult);
44
+ try {
45
+ const implMethodResult = await this.process({ url, body });
46
+ return Response.json(implMethodResult);
47
+ }
48
+ catch (err) {
49
+ if (err.errorType === 'SPI' && err.applicationCode && err.httpCode) {
50
+ return Response.json({ applicationError: { code: err.applicationCode, data: err.data } }, { status: err.httpCode });
51
+ }
52
+ throw err;
53
+ }
46
54
  },
47
55
  async executeHandler(servicePluginRequest, url) {
48
56
  const componentType = servicePluginRequest.metadata.appExtensionType.toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk",
3
- "version": "1.14.3",
3
+ "version": "1.14.4",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -70,7 +70,7 @@
70
70
  "@wix/sdk-runtime": "0.3.23",
71
71
  "@wix/sdk-types": "^1.12.4",
72
72
  "jose": "^5.9.6",
73
- "type-fest": "^4.26.1"
73
+ "type-fest": "^4.27.0"
74
74
  },
75
75
  "optionalDependencies": {
76
76
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
@@ -79,17 +79,17 @@
79
79
  "@types/is-ci": "^3.0.4",
80
80
  "@types/node": "^20.17.6",
81
81
  "@vitest/ui": "^1.6.0",
82
- "@wix/ecom": "^1.0.817",
83
- "@wix/events": "^1.0.335",
82
+ "@wix/ecom": "^1.0.829",
83
+ "@wix/events": "^1.0.338",
84
84
  "@wix/metro": "^1.0.89",
85
- "@wix/metro-runtime": "^1.1850.0",
85
+ "@wix/metro-runtime": "^1.1854.0",
86
86
  "@wix/sdk-runtime": "0.3.23",
87
87
  "eslint": "^8.57.1",
88
88
  "eslint-config-sdk": "0.0.0",
89
89
  "graphql": "^16.8.0",
90
90
  "is-ci": "^3.0.1",
91
91
  "jsdom": "^22.1.0",
92
- "msw": "^2.6.2",
92
+ "msw": "^2.6.5",
93
93
  "typescript": "^5.6.3",
94
94
  "vitest": "^1.6.0",
95
95
  "vitest-teamcity-reporter": "^0.3.1"
@@ -117,5 +117,5 @@
117
117
  "wallaby": {
118
118
  "autoDetect": true
119
119
  },
120
- "falconPackageHash": "4191fb2c7472cdb151031db3abcedd93dc289b348285911ef4f8804e"
120
+ "falconPackageHash": "94303cb167edda6e2a316a0d1cbbc1262c00a356ac99dd3f186349ed"
121
121
  }