A sneak peak into the upcoming blog on how we built the new domains page & how Effect is used on the frontend in it
This is our error handling for the add to cart button, in most applications this would be an API call and then an error toast if it fails
In ours, we know exactly what all of the possible errors are and for the most common ones, we are able to add in special logic to help recover the user or give them information into what happened
I'm somewhat of the belief that Effect isn't about handling every error, it's about knowing how your application will behave and being able to handle the most common cases
If we saw a dramatic increase in `NotAuthorizedForScope` errors for example, we'd be able to very quickly add custom logic to handle it
Having an end to end type safe RPC client with generated errors is pretty incredible, and we haven't even gotten into all of the cool optimizations it allowed us to do