While looking into changing how auth works (tl;dr the app really needs to be responsible for auth, I think, so that it's possible to SSR user content), I found myself getting a bit lost in the codebase because of how errors are handled, which is to say they're not — any database operation returns true or false (or in the case of .get, a non-boolean value or false).
As well as making things (subjectively!) harder to follow, this results in more code, harder-to-track errors, and more convoluted types (I found the Thing | void return types to be problematic in my tinkering).
While looking into changing how auth works (tl;dr the app really needs to be responsible for auth, I think, so that it's possible to SSR user content), I found myself getting a bit lost in the codebase because of how errors are handled, which is to say they're not — any database operation returns
true
orfalse
(or in the case of.get
, a non-boolean value orfalse
).As well as making things (subjectively!) harder to follow, this results in more code, harder-to-track errors, and more convoluted types (I found the
Thing | void
return types to be problematic in my tinkering).