testdriverai 4.1.11 → 4.1.12

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/lib/sdk.js +8 -5
  2. package/package.json +1 -1
package/lib/sdk.js CHANGED
@@ -169,11 +169,14 @@ const req = async (path, data, onChunk) => {
169
169
  }
170
170
 
171
171
  const value = await parseBody(response, result);
172
- if (!value) {
173
- throw new Error("Unexpected empty response body");
174
- }
175
- if (!path.includes("analytics") && !("data" in value)) {
176
- throw new Error("Missing data property in response body");
172
+
173
+ if (!path.includes("analytics")) {
174
+ if (!value) {
175
+ throw new Error("Unexpected empty response body");
176
+ }
177
+ if (!("data" in value)) {
178
+ throw new Error("Missing data property in response body");
179
+ }
177
180
  }
178
181
  return value;
179
182
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.1.11",
3
+ "version": "4.1.12",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {