@agimon-ai/po-log 0.0.0-alpha.37 → 0.0.0-alpha.38

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.
@@ -559,8 +559,10 @@ function createServerTelemetry(options = {}) {
559
559
  if (message?.stopReason === "error" || message?.stopReason === "aborted") {
560
560
  const failure = {
561
561
  ...attributes,
562
- "error.type": "ProviderError",
563
- "error.code": message.stopReason,
562
+ ...message.stopReason === "error" ? {
563
+ "error.type": "ProviderError",
564
+ "error.code": "error"
565
+ } : {},
564
566
  outcome: message.stopReason === "aborted" ? "aborted" : "error"
565
567
  };
566
568
  if (message.stopReason === "aborted") await current.recordWarning("pi.turn.failed", void 0, failure);