Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yahooFinance.setGlobalConfig() isn't available #376

Closed
glintik opened this issue Jan 13, 2022 · 5 comments
Closed

yahooFinance.setGlobalConfig() isn't available #376

glintik opened this issue Jan 13, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@glintik
Copy link

glintik commented Jan 13, 2022

Bug Report

Describe the bug

yahooFinance.setGlobalConfig() isn't available as per doc in https://github.com/gadicc/node-yahoo-finance2/blob/devel/docs/validation.md:

yahooFinance.setGlobalConfig({ validation: { logErrors: false} });

Minimal Reproduction

const yahooFinance = require('yahoo-finance2').default;
yahooFinance.setGlobalConfig({ validation: { logErrors: false} });

Environment

Browser or Node:
Node version (if applicable):
Npm version: 2.1.0
Browser verion (if applicable):
Library version (e.g. 1.10.1):

Additional Context

@glintik glintik added the bug Something isn't working label Jan 13, 2022
@gadicc
Copy link
Owner

gadicc commented Jan 15, 2022

hey @glintik, thanks for reporting. This is fixed and will be in the next release (there'll be an automated message here when that happens).

gadicc pushed a commit that referenced this issue Jan 15, 2022
## [2.1.1](v2.1.0...v2.1.1) (2022-01-15)

### Bug Fixes

* **setGlobalConfig:** add to index; minor improvements ([#376](#376)) ([464f26f](464f26f))
@gadicc
Copy link
Owner

gadicc commented Jan 15, 2022

🎉 This issue is fixed in version 2.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@glintik
Copy link
Author

glintik commented Jan 15, 2022

@gadicc Thank you for quick fix!

Btw, the code is simple:

let quote = await yahooFinance.quote('SRNG');

but when I run it, I'm getting throwed FailedYahooValidationError exception with 91 errors!
Screenshot 2022-01-15 at 13 01 53

Expected behaviour - return undefined.

Some details about SRNG:
It's SPAC company that was used by Ginkgo Bioworks to be listed on NYSE. Just after SPAC deal, SRNG renamed to DNA.

@gadicc
Copy link
Owner

gadicc commented Jan 15, 2022

Ah thanks, we'll look into that. Yeah, the error count is a bit misleading for the 'anyOf' case... we can probably slim it down by giving up after the first error for each case/type (equity, crypto, etc). Thanks for the background info, super helpful to understand all these edge cases.

@gadicc
Copy link
Owner

gadicc commented Jan 15, 2022

Closing this one.

@gadicc gadicc closed this as completed Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants