@posthog/ai 8.6.3 → 8.6.4

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.
@@ -395,7 +395,7 @@ function sanitizeValues(obj) {
395
395
  return jsonSafe;
396
396
  }
397
397
 
398
- var version = "8.6.3";
398
+ var version = "8.6.4";
399
399
 
400
400
  const DEFAULT_MAX_DEPTH = 3;
401
401
  const MAX_STACK_LINES = 20;
@@ -528,6 +528,8 @@ const captureAiGeneration = async (client, options) => {
528
528
  if (httpStatus === undefined) {
529
529
  if (typeof options.error === 'object' && 'status' in options.error && typeof options.error.status === 'number') {
530
530
  httpStatus = options.error.status;
531
+ } else if (typeof options.error === 'object' && 'statusCode' in options.error && typeof options.error.statusCode === 'number') {
532
+ httpStatus = options.error.statusCode;
531
533
  } else {
532
534
  httpStatus = 500;
533
535
  }