private static String buildUri(ProxyContext context) {
        HttpServerRequest request = context.getRequest();
        Deployment deployment = context.getDeployment();
        String endpoint = deployment.getEndpoint();
        String query = request.query();
        return endpoint + (query == null ? "" : "?" + query);
    }
Called when proxy failed to send response to the client.
server/src/main/java/com/epam/aidial/core/server/controller/DeploymentPostController.java