Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
srv.on("status", function(status: grpcWeb.Status) {
if (status.code != grpcWeb.StatusCode.OK) {
console.log("Got streaming error");
console.log("Error:", status.details);
console.log("Code:", status.code);
console.log("Metadata:", status.metadata);
}
});
}
(err: grpcWeb.Error, response: EchoResponse) => {
if (err) {
if (err.code !== grpcWeb.StatusCode.OK) {
EchoApp.addRightMessage(
'Error code: ' + err.code + ' "' + err.message + '"');
}
} else {
setTimeout(() => {
EchoApp.addRightMessage(response.getMessage());
}, EchoApp.INTERVAL);
}
});
call.on('status', (status: grpcWeb.Status) => {