julien-pal / node-red-contrib-elasticsearch

Node RED wrapper for elasticsearch node client
8 stars 5 forks source link

References to variables that don't exist/have typos #6

Closed boisei0 closed 5 years ago

boisei0 commented 5 years ago

The code contains multiple references to not existing variables/methods, or have typos in them. For example referencing err instead of error, which on an error results in yet another error because Node-RED can't handle the actual error. A few samples below, but there might be more I haven't spotted yet.

https://github.com/julien-pal/node-red-contrib-elasticsearch/blob/8b537ebe66edd09abec727453c9d8f15986fe8c8/elasticsearch/elasticsearch-bulk.js#L43-L47 err instead of error

https://github.com/julien-pal/node-red-contrib-elasticsearch/blob/8b537ebe66edd09abec727453c9d8f15986fe8c8/elasticsearch/elasticsearch-config.js#L17-L26 What is the gRPC server? No variable this.localServer, no function stopServer

https://github.com/julien-pal/node-red-contrib-elasticsearch/blob/8b537ebe66edd09abec727453c9d8f15986fe8c8/elasticsearch/elasticsearch-config.html#L28 The port is defined on the javascript file, but not on the configuration (html), will likely result in problems. Furthermore, the port is never used when creating the client: https://github.com/julien-pal/node-red-contrib-elasticsearch/blob/8b537ebe66edd09abec727453c9d8f15986fe8c8/elasticsearch/elasticsearch-config.js#L32-L37

https://github.com/julien-pal/node-red-contrib-elasticsearch/blob/8b537ebe66edd09abec727453c9d8f15986fe8c8/elasticsearch/elasticsearch-search.html#L1 Again the gRPC server. Isn't this the elasticsearch.search functionality?

julien-pal commented 5 years ago

Thank you for pointing out those typos ! I've corrected them in the version 1.1.7