@gammatech/aijsx 0.16.1-dev.2024-11-05 → 0.16.2-dev.2024-11-05

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
@@ -82,6 +82,9 @@ var ChatCompletionError = class extends Error {
82
82
  this.status = status;
83
83
  this.shouldRetry = shouldRetry4;
84
84
  this.originalError = originalError;
85
+ if (originalError?.stack) {
86
+ this.stack = originalError.stack;
87
+ }
85
88
  }
86
89
  name = "ChatCompletionError";
87
90
  };
@@ -2617,12 +2620,19 @@ async function* AnthropicChatCompletionInner(props, ctx) {
2617
2620
  `AnthropicClient.APIError: ${err.message}`,
2618
2621
  logRequestData,
2619
2622
  status,
2620
- retry
2623
+ retry,
2624
+ err
2621
2625
  );
2622
2626
  } else if (err instanceof Error) {
2623
2627
  const status = extractStatusFromError2(err);
2624
2628
  const retry = shouldRetryFromStatus(status);
2625
- throw new ChatCompletionError(err.message, logRequestData, status, retry);
2629
+ throw new ChatCompletionError(
2630
+ err.message,
2631
+ logRequestData,
2632
+ status,
2633
+ retry,
2634
+ err
2635
+ );
2626
2636
  }
2627
2637
  throw err;
2628
2638
  }
package/dist/index.mjs CHANGED
@@ -14,6 +14,9 @@ var ChatCompletionError = class extends Error {
14
14
  this.status = status;
15
15
  this.shouldRetry = shouldRetry4;
16
16
  this.originalError = originalError;
17
+ if (originalError?.stack) {
18
+ this.stack = originalError.stack;
19
+ }
17
20
  }
18
21
  name = "ChatCompletionError";
19
22
  };
@@ -2516,12 +2519,19 @@ async function* AnthropicChatCompletionInner(props, ctx) {
2516
2519
  `AnthropicClient.APIError: ${err.message}`,
2517
2520
  logRequestData,
2518
2521
  status,
2519
- retry
2522
+ retry,
2523
+ err
2520
2524
  );
2521
2525
  } else if (err instanceof Error) {
2522
2526
  const status = extractStatusFromError2(err);
2523
2527
  const retry = shouldRetryFromStatus(status);
2524
- throw new ChatCompletionError(err.message, logRequestData, status, retry);
2528
+ throw new ChatCompletionError(
2529
+ err.message,
2530
+ logRequestData,
2531
+ status,
2532
+ retry,
2533
+ err
2534
+ );
2525
2535
  }
2526
2536
  throw err;
2527
2537
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gammatech/aijsx",
3
- "version": "0.16.1-dev.2024-11-05",
3
+ "version": "0.16.2-dev.2024-11-05",
4
4
  "description": "Rewrite of aijsx",
5
5
  "author": "Jordan Garcia",
6
6
  "license": "MIT",