Skip to content

Commit

Permalink
YF: improve alert message
Browse files Browse the repository at this point in the history
  • Loading branch information
mcieno committed Oct 27, 2024
1 parent fa0bed4 commit 56ee1df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/src/components/yf.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ export async function download(tickers, alert = console.error) {
/** @type {Set<string>} */
const symbols = new Set();

for (const ticker of tickers) {
for (const ticker of tickers.map(t => t.toUpperCase())) {
const data = await fetchTickerDataFromYahooFinance(ticker, alert);
if (data === null) {
alert(`
Failed to fetch data for ticker "${ticker}".
Data for ticker "${ticker}" was not found on Yahoo Finance.
Make sure you didn't forget the exchange identifier (e.g. "${ticker}.MI" or "${ticker}.DE").
Make sure you input a valid ticker and you didn't forget the exchange identifier (e.g. "${ticker}.MI" or "${ticker}.DE").
If you think this is a bug, please report it.
`);
Expand Down

0 comments on commit 56ee1df

Please sign in to comment.