Concept Flow - Thrown responses for HTTP errors
Request received
Run loader/action
Check for error condition
Yes
Throw new Response with error status
Remix catches thrown Response
Render error boundary or error page
Send HTTP error response to client
End
When an error condition occurs in a loader or action, Remix throws a Response with an HTTP error status. Remix catches this and renders the error UI, sending the proper HTTP status to the client.
