sst 2.22.3 → 2.22.5

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.
@@ -2,7 +2,8 @@ import https from "https";
2
2
  export function postPayload(endpoint, body) {
3
3
  return new Promise((resolve, reject) => {
4
4
  try {
5
- const req = https.request(endpoint, {
5
+ const req = https
6
+ .request(endpoint, {
6
7
  method: "POST",
7
8
  headers: { "content-type": "application/json" },
8
9
  timeout: 5000,
@@ -12,6 +13,9 @@ export function postPayload(endpoint, body) {
12
13
  return;
13
14
  }
14
15
  resolve();
16
+ })
17
+ .on("error", () => {
18
+ // catches connect ECONNREFUSED while the below catch does not work as expected
15
19
  });
16
20
  req.write(JSON.stringify(body));
17
21
  req.end();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.22.3",
4
+ "version": "2.22.5",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
package/sst.mjs CHANGED
@@ -569,7 +569,8 @@ function postPayload(endpoint, body) {
569
569
  }
570
570
  resolve2();
571
571
  }
572
- );
572
+ ).on("error", () => {
573
+ });
573
574
  req.write(JSON.stringify(body));
574
575
  req.end();
575
576
  } catch (ex) {