aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-07-08 09:17:39 -0700
committerGravatar murgatroid99 <mlumish@google.com>2015-07-08 09:17:39 -0700
commit8dae13e0d19506f5af056a7f1fe5caf760ef2aa3 (patch)
tree4e643473481cd0b7580f93e3c717d5ee75433ee9
parent44a4ef3b5a8c59530ddfc75b3bd98a94d975d9cd (diff)
Made Node server respond with UNKNOWN for unspecified application errors
-rw-r--r--src/node/src/server.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node/src/server.js b/src/node/src/server.js
index c6cf9e7eb8..62a107c8a4 100644
--- a/src/node/src/server.js
+++ b/src/node/src/server.js
@@ -55,7 +55,7 @@ var EventEmitter = require('events').EventEmitter;
*/
function handleError(call, error) {
var status = {
- code: grpc.status.INTERNAL,
+ code: grpc.status.UNKNOWN,
details: 'Unknown Error',
metadata: {}
};
@@ -142,12 +142,12 @@ function setUpWritable(stream, serialize) {
stream.on('finish', sendStatus);
/**
* Set the pending status to a given error status. If the error does not have
- * code or details properties, the code will be set to grpc.status.INTERNAL
+ * code or details properties, the code will be set to grpc.status.UNKNOWN
* and the details will be set to 'Unknown Error'.
* @param {Error} err The error object
*/
function setStatus(err) {
- var code = grpc.status.INTERNAL;
+ var code = grpc.status.UNKNOWN;
var details = 'Unknown Error';
var metadata = {};
if (err.hasOwnProperty('message')) {