@bitfab/sdk 0.39.0 → 0.41.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.
@@ -99,7 +99,7 @@ function encodeRequestBody(body) {
99
99
  }
100
100
 
101
101
  // src/version.generated.ts
102
- var __version__ = "0.39.0";
102
+ var __version__ = "0.41.0";
103
103
  var __packageName__ = "@bitfab/sdk";
104
104
 
105
105
  // src/constants.ts
@@ -1556,6 +1556,10 @@ var HttpClient = class {
1556
1556
  const response = await this.get(endpoint);
1557
1557
  return response.span;
1558
1558
  }
1559
+ /**
1560
+ * GET a JSON endpoint on the service with the client's API key. Throws a
1561
+ * `BitfabError` carrying the status text for any non-2xx response.
1562
+ */
1559
1563
  async get(endpoint) {
1560
1564
  const url = `${this.serviceUrl}${endpoint}`;
1561
1565
  const controller = new AbortController();
@@ -1569,7 +1573,10 @@ var HttpClient = class {
1569
1573
  if (!response.ok) {
1570
1574
  const errorText = await response.text();
1571
1575
  throw new BitfabError(
1572
- `HTTP ${response.status}: ${errorText.slice(0, 500)}`
1576
+ `HTTP ${response.status}: ${errorText.slice(0, 500)}`,
1577
+ void 0,
1578
+ response.status,
1579
+ parseRetryAfterMs(readHeader(response, "retry-after"))
1573
1580
  );
1574
1581
  }
1575
1582
  return await response.json();
@@ -1847,4 +1854,4 @@ export {
1847
1854
  parseRetryAfterMs,
1848
1855
  HttpClient
1849
1856
  };
1850
- //# sourceMappingURL=chunk-2JQSYJJR.js.map
1857
+ //# sourceMappingURL=chunk-IFYX3KW6.js.map