Closed zspitz closed 3 months ago
throwing a response will render your nearest errorElement
and allow you to check the status code via isRouteErrorResponse and render a 404 (or other status code specific) page instead of rendering a more generic error screen
In the Not found data section, when the parameter doesn't match a contact, you suggest
throw
ing aResponse
object:Is there any specific reason not to
throw
a simpleError
object:which is generally preferable?
The same throwing of a
Response
can also be seen in theuseLoader
documentation.