@resistdesign/voltra 3.0.0-alpha.55 → 3.0.0-alpha.56

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.
Files changed (2) hide show
  1. package/app/index.js +5 -12
  2. package/package.json +1 -1
package/app/index.js CHANGED
@@ -140,23 +140,16 @@ var sendServiceRequest = async (config, path = "", args = [], requestConfig = {}
140
140
  });
141
141
  const { ok: responseIsOk } = response;
142
142
  const textData = await response.text();
143
- let data = textData;
143
+ let data;
144
144
  try {
145
145
  data = JSON.parse(textData);
146
146
  } catch (error) {
147
+ data = void 0;
147
148
  }
148
- if (typeof data === "object") {
149
- if (responseIsOk) {
150
- return data;
151
- } else {
152
- throw data;
153
- }
149
+ if (responseIsOk) {
150
+ return data;
154
151
  } else {
155
- if (responseIsOk) {
156
- return { data };
157
- } else {
158
- throw { message: data };
159
- }
152
+ throw data;
160
153
  }
161
154
  } finally {
162
155
  if (cancelPendingOnNewRequest) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resistdesign/voltra",
3
- "version": "3.0.0-alpha.55",
3
+ "version": "3.0.0-alpha.56",
4
4
  "description": "With our powers combined!",
5
5
  "homepage": "https://voltra.app",
6
6
  "repository": "git@github.com:resistdesign/voltra.git",