grammY icon indicating copy to clipboard operation
grammY copied to clipboard

feat: make init optionally unreliable

Open KnorpelSenf opened this issue 3 years ago • 3 comments

As requested by @roziscoding for doing a custom error handling in the browser that involves users explicitly clicking retry before handling errors

KnorpelSenf avatar Oct 13 '22 22:10 KnorpelSenf

A bit harsh on the JSDoc, but I really just want to get an error if an error happens, so I'll take what I can have

roziscoding avatar Oct 13 '22 22:10 roziscoding

A bit harsh on the JSDoc

It's important to be transparent when implementing something dangerous.

KnorpelSenf avatar Oct 13 '22 23:10 KnorpelSenf

I just generally disagree with this approach. It's like a hack to avoid something which we could solve instead. There are in fact two problems and they have different solutions.

We're missing control around aborting the initialisation (solution: add an abort signal).

We're causing high load on browsers when offline (solution: backoff between requests).

I think these two things are much preferable over what I've done here. I'll close this as soon as I have a superseding PQ.

KnorpelSenf avatar Oct 18 '22 09:10 KnorpelSenf