Currently there is only one boundary - NotFoundBoundary which catches only NotFoundError errors. In my app I also need to prevent access to specific pages and for that I would like to create a custom error - e.g.AccessDeniedError and corresponding boundary as well. But I'm not sure how to do it. The original NotFoundBoundary uses NaviContext which is not exported.
Currently there is only one boundary -
NotFoundBoundary
which catches onlyNotFoundError
errors. In my app I also need to prevent access to specific pages and for that I would like to create a custom error - e.g.AccessDeniedError
and corresponding boundary as well. But I'm not sure how to do it. The originalNotFoundBoundary
usesNaviContext
which is not exported.So how can one add new error types and effectively catch them?