public override async Task InvokeAsync(ClientActionContext context)
        {
            if (context.ServerConnection == null)
            {
                context.ServerConnection = ServerProvider.GetServer();
            }

            context.GetRequestOrThrow().RequestUri = EndpointProvider.GetEndpoint(context.ServerConnection.Server, context.Contract, context.Action);
            try
            {
                await Next(context).ConfigureAwait(false);
            }
            catch (HttpRequestException)
            {
                ServerProvider.OnServerUnavailable(context.Request.RequestUri);
                throw;
            }
        }