@sanity/client 7.11.0-cors-check.1 → 7.11.0-live-cors

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.
@@ -1493,13 +1493,15 @@ class LiveClient {
1493
1493
  operators.shareReplay(1)
1494
1494
  // run only once
1495
1495
  ), observable = events.pipe(
1496
- // Do our best to detect CORS errors first
1497
- rxjs.catchError((err) => checkCors$.pipe(rxjs.mergeMap(() => {
1498
- throw err;
1499
- }))),
1496
+ rxjs.catchError((err) => (console.log("[live] err from catchError", err), checkCors$.pipe(
1497
+ rxjs.mergeMap(() => (console.log("[live] err from checkCors$", err), rxjs.of(err))),
1498
+ rxjs.mergeMap(() => {
1499
+ throw console.log("[live] throwing err from checkCors$", err), err;
1500
+ })
1501
+ ))),
1500
1502
  reconnectOnConnectionFailure(),
1501
1503
  operators.map((event) => {
1502
- if (event.type === "message") {
1504
+ if (console.log("event", event), event.type === "message") {
1503
1505
  const { data, ...rest } = event;
1504
1506
  return { ...rest, tags: data.tags };
1505
1507
  }