@bitfab/sdk 0.13.7 → 0.13.8

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.cjs CHANGED
@@ -35,7 +35,7 @@ var __version__;
35
35
  var init_version_generated = __esm({
36
36
  "src/version.generated.ts"() {
37
37
  "use strict";
38
- __version__ = "0.13.7";
38
+ __version__ = "0.13.8";
39
39
  }
40
40
  });
41
41
 
@@ -142,7 +142,9 @@ var init_http = __esm({
142
142
  )
143
143
  ),
144
144
  rawSpan: {},
145
- errors: [{ step: "json_serialize", error: serializationError }]
145
+ errors: [
146
+ { source: "sdk", step: "json_serialize", error: serializationError }
147
+ ]
146
148
  });
147
149
  }
148
150
  try {
@@ -2168,6 +2170,7 @@ var BitfabOpenAITracingProcessor = class {
2168
2170
  const jsonResult = span.toJSON();
2169
2171
  if (typeof jsonResult !== "object" || jsonResult === null) {
2170
2172
  errors.push({
2173
+ source: "sdk",
2171
2174
  step: "span.toJSON()",
2172
2175
  error: `Returned unexpected type: ${typeof jsonResult}`
2173
2176
  });
@@ -2177,6 +2180,7 @@ var BitfabOpenAITracingProcessor = class {
2177
2180
  }
2178
2181
  } catch (error) {
2179
2182
  errors.push({
2183
+ source: "sdk",
2180
2184
  step: "span.toJSON()",
2181
2185
  error: error instanceof Error ? error.message : String(error)
2182
2186
  });
@@ -2196,6 +2200,7 @@ var BitfabOpenAITracingProcessor = class {
2196
2200
  spanData.input = span.spanData?._input || [];
2197
2201
  } catch (error) {
2198
2202
  errors.push({
2203
+ source: "sdk",
2199
2204
  step: "access_input",
2200
2205
  error: error instanceof Error ? error.message : String(error)
2201
2206
  });
@@ -2204,6 +2209,7 @@ var BitfabOpenAITracingProcessor = class {
2204
2209
  spanData.response = span.spanData?._response || null;
2205
2210
  } catch (error) {
2206
2211
  errors.push({
2212
+ source: "sdk",
2207
2213
  step: "access_response",
2208
2214
  error: error instanceof Error ? error.message : String(error)
2209
2215
  });
@@ -3132,7 +3138,10 @@ var Bitfab = class {
3132
3138
  ...params.functionName !== void 0 && {
3133
3139
  function_name: params.functionName
3134
3140
  },
3135
- ...params.error !== void 0 && { error: params.error },
3141
+ ...params.error !== void 0 && {
3142
+ error: params.error,
3143
+ error_source: "code"
3144
+ },
3136
3145
  ...params.contexts && params.contexts.length > 0 && {
3137
3146
  contexts: params.contexts
3138
3147
  },