@unboundcx/sdk 2.7.0 → 2.7.2
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/base.js +7 -4
- package/package.json +1 -1
package/base.js
CHANGED
|
@@ -316,6 +316,12 @@ export class BaseSDK {
|
|
|
316
316
|
async _processResponse(response, transport, method, endpoint) {
|
|
317
317
|
// Check if the response indicates an HTTP error
|
|
318
318
|
// These are API/configuration errors, not transport failures
|
|
319
|
+
|
|
320
|
+
const responseHeaders = response.headers;
|
|
321
|
+
const responseRequestId =
|
|
322
|
+
responseHeaders?.get?.('x-request-id') ||
|
|
323
|
+
responseHeaders?.['x-request-id'] || '';
|
|
324
|
+
|
|
319
325
|
if (!response.ok) {
|
|
320
326
|
let errorBody;
|
|
321
327
|
if (response?.body) {
|
|
@@ -394,10 +400,7 @@ export class BaseSDK {
|
|
|
394
400
|
responseBody = {};
|
|
395
401
|
}
|
|
396
402
|
|
|
397
|
-
|
|
398
|
-
const responseRequestId =
|
|
399
|
-
responseHeaders?.get?.('x-request-id') ||
|
|
400
|
-
responseHeaders?.['x-request-id'];
|
|
403
|
+
|
|
401
404
|
|
|
402
405
|
|
|
403
406
|
// Debug logging for successful HTTP requests
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|