mirror of https://github.com/grpc/grpc-node.git
Native server: don't pass non-integer status codes to core
This commit is contained in:
parent
f840792b89
commit
2b28598312
|
@ -52,7 +52,7 @@ function handleError(call, error) {
|
|||
if (error.hasOwnProperty('message')) {
|
||||
status.details = error.message;
|
||||
}
|
||||
if (error.hasOwnProperty('code')) {
|
||||
if (error.hasOwnProperty('code') && Number.isInteger(error.code)) {
|
||||
status.code = error.code;
|
||||
if (error.hasOwnProperty('details')) {
|
||||
status.details = error.details;
|
||||
|
|
Loading…
Reference in New Issue