Skip to content

Conversation

@ryan-gang
Copy link

Fixes a panic that occurs when Yahoo API returns empty data for invalid tickers.

Added a simple length check before accessing response.Chart.Result[0] and returns a clear error message instead of crashing.

Fixes #337.
(It took me quite some time to figure out that the issue was with updated tickers, which is why I felt this could be helpful for others too.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paisa panics while fetching prices for certain equity instruments

1 participant