@browsermation/test 0.0.25 → 0.0.26

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/bin/cli.js CHANGED
@@ -42258,7 +42258,7 @@ var {
42258
42258
  // package.json
42259
42259
  var package_default = {
42260
42260
  name: "@browsermation/test",
42261
- version: "0.0.25",
42261
+ version: "0.0.26",
42262
42262
  description: "The testing platform for Playwright by Browsermation.",
42263
42263
  main: "./dist/index.js",
42264
42264
  types: "./dist/index.d.ts",
package/dist/index.js CHANGED
@@ -601,6 +601,12 @@ async function fetchEndpoint() {
601
601
  }
602
602
  return new Promise((resolve, reject) => {
603
603
  protocol.get(process.env.SERVER_URL || "", (res) => {
604
+ if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 300)) {
605
+ return reject(new Error(`HTTP status code ${res.statusCode} received`));
606
+ }
607
+ res.on("error", (err) => {
608
+ reject(err);
609
+ });
604
610
  res.on("data", async (chunk) => {
605
611
  try {
606
612
  const parsedData = JSON.parse(chunk.toString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browsermation/test",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "The testing platform for Playwright by Browsermation.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",