Centralized error handling
Hiii everyone, I am working on a huge educational project and we have a start frontend where the majority of serverFn's simply call another API
We haven't figured out yet how to handle errors in a centralized manner, and this is forcing us to do a nasty try...catch everywhere, it is verbose and IMO unecessary, but we haven't found a better way yet
Example of how we are handling errors, in this case the analytics api is external to the frontend.
This pattern of having an auth check + the try...catch for the operation is repeated everywhere in our frontend, and I am looking for ways to better handle this in a centralized
From what I found in the chats global middlewares are not working atm
1 Reply
exotic-emeraldOP•3w ago
@Manuel Schiller @Tanner Linsley any insights on this guys? I'm sure there is a better way, just not sure which way 😅