TestServiceClient.prototype.pingEmpty = function pingEmpty(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; } grpc.unary(TestService.PingEmpty, { request: requestMessage, host: this.serviceHost, metadata: metadata, transport: this.options.transport, debug: this.options.debug, onEnd: function (response) { if (callback) { if (response.status !== grpc.Code.OK) { callback(Object.assign(new Error(response.statusMessage), { code: response.status, metadata: response.trailers }), null); } else { callback(null, response.message); } } } }); };