Open aboodman opened 1 year ago
This is once again our assertion functions not printing context aware errors.
Is there a general pattern we can look for in the codebase to find all of these at once?
On Sun, Oct 16, 2022 at 10:27 PM Erik Arvidsson @.***> wrote:
This is once again our assertion functions not printing context aware errors.
— Reply to this email directly, view it on GitHub https://github.com/rocicorp/replicache/issues/1028#issuecomment-1280480103, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATUBGSDK35EKBSHHCXOZLWDUEYRANCNFSM6AAAAAARGPFYNA . You are receiving this because you authored the thread.Message ID: @.***>
-- a (phone)
Is there a general pattern we can look for in the codebase to find all of these at once?
Yes. These function all look like:
export function assertIndexDefinitions(
value: unknown,
): asserts value is IndexDefinitions {
...
}
See: https://discord.com/channels/830183651022471199/830183651022471202/1031283567906541642
I used a debug build to see that error was actually:
We need to handle these errors better and print a more comprehensible error message. Check puller too.
See also: https://github.com/rocicorp/replicache/issues/575. Perhaps should do at same time.