screenshotone-api-sdk 1.0.16 → 1.0.17
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/main.js +2 -1
- package/package.json +1 -1
- package/src/main.ts +3 -1
package/dist/main.js
CHANGED
|
@@ -56,7 +56,8 @@ class Client {
|
|
|
56
56
|
if (response.ok) {
|
|
57
57
|
return await response.blob();
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
const data = await response.json();
|
|
60
|
+
throw new Error(`failed to take screenshot, response returned ${response.status} ${response.statusText}: ${data?.message}`);
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
exports.Client = Client;
|
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -37,7 +37,9 @@ export class Client {
|
|
|
37
37
|
return await response.blob()
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
const data = await response.json();
|
|
41
|
+
|
|
42
|
+
throw new Error(`failed to take screenshot, response returned ${response.status} ${response.statusText}: ${data?.message}`);
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
|