node-google-finance icon indicating copy to clipboard operation
node-google-finance copied to clipboard

Undocumented / incorrect error handling

Open Richie765 opened this issue 6 years ago • 0 comments

The historical function returns an empty array [] on any kind of error (network error, symbol not found, etc). While investigating I found there is an undocumented option error that can be set to true to get errors thrown.

I believe it is better to remove this option and just throw the errors so the user of the module can handle the errors the way they like.

Same applies to companyNews and yahoo-finance.historical.

If you agree I can make a PR request for it.

Richie765 avatar Jan 23 '18 21:01 Richie765