rocicorp / replicache

Realtime Sync for Any Backend Stack
https://doc.replicache.dev
1.05k stars 37 forks source link

Do we really swallow subscriptions that throw by default?? #862

Closed aboodman closed 2 years ago

aboodman commented 2 years ago

I just did useSubscribe(...thing that throws...) and ... nothing showed up anywhere. What the? It looks like we swallow errors from subscription functions.

We should send them to console.error() by default.

aboodman commented 2 years ago

This is pretty surprising and bad so we should fix for GA.

arv commented 2 years ago

Yup, we do nothing if onError is not provided. We should at least call console.error.

https://github.com/rocicorp/replicache/blob/main/src/replicache.ts#L1140