Closed venil7 closed 3 years ago
Have you observerd any other fields that are sometimes missing?
There are typically two solutions to this problem: change the field to Option
It does happen for other fields too!
My preference would be ""
as it doesnt change the interface
It also seems random
for examlpe i get failure
deserializing response from yahoo! finance failed: missing field "shortname"
for search term abc
, while previously it was returning values
I guess Y! finace api itself is not guaranteeing all fields at all times, hence best to fallback to ""
I have implemented now both version, keeping the existing interface, but returning empty string for shortname and longname, if they missing, add added a new method (named with "_opt" at the end) that returns an Option for shortname and longname.
Awesome, thanks, version 1.1.4-dev
is not on crates.io yet, is it?
Not yet, I wanted to update the docs and make sure that it does work before I publish an update to crates.io, will do so soon.
It's now pushed to crates.io, closing issue
for example search term
TSLA
,MSFT
,AAPL
bitcoin
fails with errordeserializing response from yahoo! finance failed: missing field "longname"