@vercel/queue 0.2.1 → 0.3.0

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/index.js CHANGED
@@ -1694,7 +1694,7 @@ Cause: ${cause}`
1694
1694
  }
1695
1695
  console.debug("[VQS Debug] Request:", JSON.stringify(logData, null, 2));
1696
1696
  }
1697
- init.headers.set("User-Agent", `@vercel/queue/${"0.2.1"}`);
1697
+ init.headers.set("User-Agent", `@vercel/queue/${"0.3.0"}`);
1698
1698
  init.headers.set("Vqs-Client-Ts", (/* @__PURE__ */ new Date()).toISOString());
1699
1699
  const fetchInit = this.dispatcher ? { ...init, dispatcher: this.dispatcher } : init;
1700
1700
  const response = await fetch(url, fetchInit);
@@ -1788,6 +1788,7 @@ Cause: ${cause}`
1788
1788
  );
1789
1789
  }
1790
1790
  if (response.status === 202) {
1791
+ await response.text();
1791
1792
  return { messageId: null };
1792
1793
  }
1793
1794
  const responseData = await response.json();
@@ -1825,6 +1826,7 @@ Cause: ${cause}`
1825
1826
  }
1826
1827
  );
1827
1828
  if (response.status === 204) {
1829
+ await response.text();
1828
1830
  return;
1829
1831
  }
1830
1832
  if (!response.ok) {
@@ -1974,6 +1976,7 @@ Cause: ${cause}`
1974
1976
  "Missing or invalid receipt handle"
1975
1977
  );
1976
1978
  }
1979
+ await response.text();
1977
1980
  return { acknowledged: true };
1978
1981
  }
1979
1982
  async changeVisibility(options) {
@@ -2025,6 +2028,7 @@ Cause: ${cause}`
2025
2028
  "Missing receipt handle or invalid visibility timeout"
2026
2029
  );
2027
2030
  }
2031
+ await response.text();
2028
2032
  return { success: true };
2029
2033
  }
2030
2034
  };