use of tech.pegasys.teku.networking.eth2.rpc.core.RpcException.ServerErrorException in project teku by ConsenSys.
the class Eth2OutgoingRequestHandlerTest method deliverError.
private void deliverError() {
final Bytes errorChunk = responseEncoder.encodeErrorResponse(new ServerErrorException());
deliverBytes(errorChunk);
}
use of tech.pegasys.teku.networking.eth2.rpc.core.RpcException.ServerErrorException in project teku by ConsenSys.
the class RpcResponseCallback method completeWithUnexpectedError.
@Override
public void completeWithUnexpectedError(final Throwable error) {
if (error instanceof PeerDisconnectedException) {
LOG.trace("Not sending RPC response as peer has already disconnected");
// But close the stream just to be completely sure we don't leak any resources.
rpcStream.closeAbruptly().reportExceptions();
} else {
completeWithErrorResponse(new ServerErrorException());
}
}
Aggregations