fix(#3618677): guard the jsonapi_views route lookup in the Views subscriber

JSON:API Views does not register a route for every view. It skips a view with no base entity type, and a view whose base entity type has no bundle carrying a JSON:API resource type. ViewsPathTranslatorSubscriber builds the route name and calls Url::fromRoute() with no guard, so for a skipped view the uncaught RouteNotFoundException 500s the whole /router/translate-path request even though the view itself resolved. This catches the exception and leaves the jsonapi_views key out, since a view with no JSON:API Views endpoint is a normal state, not an error. Covered by a new kernel test on a watchdog view, and verified on a running site, 500 before and 200 after.

Merge request reports

Loading
Loading