Throw `json` in middleware not working for route rendered on server
I have a basic role check in server middleware. In the
loaderData
function of a Route, it makes a call to a server function using that middleware.
However, the server crashes when the route attempts to be loaded by a server without the required role. Any reason why this would be?
My middleware:
1 Reply
passive-yellow•3d ago
"crashes" how?
probably best if you can provide a complete minimal example repository