@bitfab/sdk 0.39.0 → 0.40.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.
@@ -94,7 +94,7 @@ function encodeRequestBody(body) {
94
94
  }
95
95
 
96
96
  // src/version.generated.ts
97
- var __version__ = "0.39.0";
97
+ var __version__ = "0.40.0";
98
98
  var __packageName__ = "@bitfab/sdk";
99
99
 
100
100
  // src/errors.ts
@@ -1569,6 +1569,10 @@ var HttpClient = class {
1569
1569
  const response = await this.get(endpoint);
1570
1570
  return response.span;
1571
1571
  }
1572
+ /**
1573
+ * GET a JSON endpoint on the service with the client's API key. Throws a
1574
+ * `BitfabError` carrying the status text for any non-2xx response.
1575
+ */
1572
1576
  async get(endpoint) {
1573
1577
  const url = `${this.serviceUrl}${endpoint}`;
1574
1578
  const controller = new AbortController();
@@ -1582,7 +1586,10 @@ var HttpClient = class {
1582
1586
  if (!response.ok) {
1583
1587
  const errorText = await response.text();
1584
1588
  throw new BitfabError(
1585
- `HTTP ${response.status}: ${errorText.slice(0, 500)}`
1589
+ `HTTP ${response.status}: ${errorText.slice(0, 500)}`,
1590
+ void 0,
1591
+ response.status,
1592
+ parseRetryAfterMs(readHeader(response, "retry-after"))
1586
1593
  );
1587
1594
  }
1588
1595
  return await response.json();
@@ -1853,4 +1860,4 @@ export {
1853
1860
  parseRetryAfterMs,
1854
1861
  HttpClient
1855
1862
  };
1856
- //# sourceMappingURL=chunk-RH4K4RSS.js.map
1863
+ //# sourceMappingURL=chunk-E2V4HFSM.js.map