@vleap/warps-adapter-fastset 0.1.0-beta.43 → 0.1.0-beta.44

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.
package/dist/index.mjs CHANGED
@@ -1401,12 +1401,23 @@ var FastsetClient = class {
1401
1401
  this.proxyUrl = proxyUrl;
1402
1402
  }
1403
1403
  async request(url, method, params) {
1404
- const request = this.buildJsonRpcRequest(id++, method, params);
1404
+ const requestId = id++;
1405
+ const request = this.buildJsonRpcRequest(requestId, method, params);
1405
1406
  const headers = { "Content-Type": "application/json" };
1406
1407
  const body = this.jsonSerialize(request);
1407
- const response = await fetch(url, { method: "POST", headers, body });
1408
- const json = await response.json();
1409
- return json;
1408
+ try {
1409
+ const response = await fetch(url, { method: "POST", headers, body });
1410
+ if (!response.ok) {
1411
+ return { jsonrpc: "2.0", id: requestId, error: { code: response.status, message: response.statusText } };
1412
+ }
1413
+ try {
1414
+ return await response.json();
1415
+ } catch {
1416
+ return { jsonrpc: "2.0", id: requestId, error: { code: -32700, message: "Parse error" } };
1417
+ }
1418
+ } catch {
1419
+ return { jsonrpc: "2.0", id: requestId, error: { code: -32603, message: "Internal error" } };
1420
+ }
1410
1421
  }
1411
1422
  buildJsonRpcRequest(id2, method, params) {
1412
1423
  return { jsonrpc: "2.0", id: id2, method, params };
@@ -1850,7 +1861,8 @@ var WarpFastsetOutput = class {
1850
1861
  values: { string: stringValues, native: rawValues, mapped: {} },
1851
1862
  output: {},
1852
1863
  messages: {},
1853
- destination: null
1864
+ destination: null,
1865
+ resolvedInputs: []
1854
1866
  };
1855
1867
  }
1856
1868
  async extractQueryOutput(warp, typedValues, actionIndex, inputs) {