get(__FUNCTION__, 'success'); try { // Ensure that calling this does not cause a recursive rebuild. \Drupal::service('router.route_provider')->getAllRoutes(); } catch (\RuntimeException $e) { $message = 'failed'; } \Drupal::state()->set(__FUNCTION__, $message); }