Merge pull request #522 from murgatroid99/error_code_number_check

Native server: don't pass non-integer status codes to core
This commit is contained in:
Michael Lumish 2018-09-04 10:48:39 -07:00 committed by GitHub
commit be1e3a4b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;