tenancy->initialize( $this->resolver->resolve(...$resolverArguments) ); } catch (TenantCouldNotBeIdentifiedException $e) { $onFail = static::$onFail ?? function ($e) { throw $e; }; return $onFail($e, $request, $next); } return $next($request); } }