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

Failed validation: #/definitions/InsightsResult #253

Closed
hantechis opened this issue Aug 3, 2021 · 2 comments
Closed

Failed validation: #/definitions/InsightsResult #253

hantechis opened this issue Aug 3, 2021 · 2 comments
Labels
bug Something isn't working released validation Issues related to validation

Comments

@hantechis
Copy link

Validation Error

Minimal Reproduction

Symbol(s) that it happened for

Error Message


Environment

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

Additional Context

The following result did not validate with schema: #/definitions/InsightsResult
[
{
instancePath: '',
schemaPath: '#/additionalProperties',
keyword: 'additionalProperties',
params: { additionalProperty: 'upsell' },
message: 'must NOT have additional properties'
}
]

This may happen intermittently and you should catch errors appropriately.
However: 1) if this recently started happening on every request for a symbol
that used to work, Yahoo may have changed their API. 2) If this happens on
every request for a symbol you've never used before, but not for other
symbols, you've found an edge-case. Please see if anyone has reported
this previously:

https://github.com/gadicc/node-yahoo-finance2/issues?q=is%3Aissue+Failed%20validation%3A%20%23%2Fdefinitions%2FInsightsResult

or open a new issue (and mention the symbol):

https://github.com/gadicc/node-yahoo-finance2/issues/new?labels=bug%2C+validation&template=validation.md&title=Failed%20validation%3A%20%23%2Fdefinitions%2FInsightsResult

For information on how to turn off the above logging or skip these errors,
see https://github.com/gadicc/node-yahoo-finance2/tree/devel/docs/validation.md.

{
"name": "FailedYahooValidationError",
"result": {
"symbol": "ABBOTINDIA.NS",
"upsell": {
"companyName": "ABBOTT INDIA LTD",
"upsellReportType": "MORNINGSTAR_ANALYST"
},
"sigDevs": [
{
"headline": "Abbott India Dec-Qtr Net Profit Slips",
"date": "2021-02-09T00:00:00.000Z"
}
]
},
"errors": [
{
"instancePath": "",
"schemaPath": "#/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "upsell"
},
"message": "must NOT have additional properties"
}
]
}

@hantechis hantechis added bug Something isn't working validation Issues related to validation labels Aug 3, 2021
@gadicc gadicc closed this as completed in 5b7eadb Aug 8, 2021
@gadicc
Copy link
Owner

gadicc commented Aug 8, 2021

Hey @hantechis, thanks for reporting this! First time we've come across this field. It's fixed in the devel branch and should be released quite soon (there'll be an automatic message here when it is). If this is common on the NSE stocks and you encounter any further problems, please do let us know! Thanks 🙏

gadicc pushed a commit that referenced this issue Aug 8, 2021
## [1.14.3](v1.14.2...v1.14.3) (2021-08-08)

### Bug Fixes

* **insights:** support optional "upsell" field (fixes [#253](#253)) ([5b7eadb](5b7eadb))
@gadicc
Copy link
Owner

gadicc commented Aug 8, 2021

🎉 This issue has been resolved in version 1.14.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gadicc gadicc added the released label Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released validation Issues related to validation
Projects
None yet
Development

No branches or pull requests

2 participants