Search in sources :

Example 1 with SendRequestTransportException

use of org.elasticsearch.transport.SendRequestTransportException in project elasticsearch by elastic.

the class CapturingTransport method handleLocalError.

/**
     * simulate a local error for the given requestId, will be wrapped
     * by a {@link SendRequestTransportException}
     *
     * @param requestId the id corresponding to the captured send
     *                  request
     * @param t the failure to wrap
     */
public void handleLocalError(final long requestId, final Throwable t) {
    Tuple<DiscoveryNode, String> request = requests.get(requestId);
    assert request != null;
    this.handleError(requestId, new SendRequestTransportException(request.v1(), request.v2(), t));
}
Also used : SendRequestTransportException(org.elasticsearch.transport.SendRequestTransportException) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode)

Aggregations

DiscoveryNode (org.elasticsearch.cluster.node.DiscoveryNode)1 SendRequestTransportException (org.elasticsearch.transport.SendRequestTransportException)1