@arbidocs/sdk 0.3.53 → 0.3.55

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
@@ -4286,6 +4286,13 @@ async function streamSSE(response, callbacks = {}) {
4286
4286
  artifacts.push(data);
4287
4287
  callbacks.onArtifact?.(data);
4288
4288
  },
4289
+ "arbi.error": (raw) => {
4290
+ const data = JSON.parse(raw);
4291
+ const message = typeof data?.message === "string" && data.message.length > 0 ? data.message : data.code;
4292
+ errors.push(message);
4293
+ callbacks.onArbiError?.(data);
4294
+ callbacks.onError?.(message);
4295
+ },
4289
4296
  "response.complete": () => {
4290
4297
  callbacks.onComplete?.();
4291
4298
  }