we-promise/sure · error · Error
Could not sign in with that passkey. Please try again or use
Error message
Could not sign in with that passkey. Please try again or use your password.
What it means
Raised by Provider::YahooFinance#fetch_security_price when the chart endpoint returned no rows for the requested window. The method fetches a 10-day range ending at the target date, then picks the exact-date price or the closest previous trading day; if every returned price is after the target date (or the list is empty), it raises this Error. It almost always means the security had not traded yet on or before that date (new listing, IPO, or a date before first quotation). It is a data-availability error, not an HTTP failure (fetch failures raise 'Failed to fetch security prices' instead).
Source
Thrown at app/javascript/controllers/webauthn_authentication_controller.js:119
}
abortConditionalMediation() {
this.abortController?.abort();
this.abortController = null;
}
// Takes a signal so the conditional flow's request can be cancelled. The
// challenge rides in the session cookie, so a response whose Set-Cookie never
// lands cannot overwrite the challenge a manual click just minted.
async fetchOptions(signal) {
const response = await fetch(this.optionsUrlValue, {
method: "POST",
headers: this.headers,
credentials: "same-origin",
signal,
});
if (!response.ok) throw new Error(await this.errorMessage(response));
return response.json();
}
async verifyCredential(credential) {
const response = await fetch(this.verifyUrlValue, {
method: "POST",
headers: this.headers,
credentials: "same-origin",
body: JSON.stringify({ credential }),
});
if (!response.ok) throw new Error(await this.errorMessage(response));
const result = await response.json();
window.location.href = result.redirect_url;
}
}View on GitHub (pinned to e69894adb9)
Solutions
- Verify the security actually traded on or before the date (check listing date on Yahoo Finance directly)
- If the date falls on a weekend/holiday, retry with the previous trading day (Date.commercial or stepping back while date.wday is 0 or 6)
- Widen the lookback window beyond the hardcoded 10 days (app/models/provider/yahoo_finance.rb:296) for thin or young instruments
- Check that symbol/exchange_operating_mic normalize to the ticker Yahoo actually serves quotes for (normalize_symbol output)
- Treat the error as a null-price case in the caller and skip or queue the record instead of failing the whole sync
Example fix
# before
price = provider.fetch_security_price(symbol: "NVDA", date: Date.parse("1998-01-01"))
# after
price = provider.fetch_security_price(symbol: "NVDA", date: trade_date)
rescue Provider::YahooFinance::Error => e
Rails.logger.warn("No price for #{symbol} at #{trade_date}: #{e.message}")
price = provider.fetch_security_price(symbol: symbol, date: trade_date - 7.days) # widen fallback
end Defensive patterns
Strategy: try-catch
Validate before calling
# Before calling fetch_security_price
trading_day = date
trading_day -= 1.day while trading_day.wday == 0 || trading_day.wday == 6
first_trade_date = Security.find_by!(symbol: symbol)&.listed_at&.to_date # if available
if first_trade_date && trading_day < first_trade_date
Rails.logger.info("#{symbol} not listed on #{date}; skipping price lookup")
end Try / catch
begin
price = provider.fetch_security_price(symbol: symbol, date: date)
rescue Provider::YahooFinance::Error => e
raise unless e.message.include?("No price found")
price = provider.fetch_security_price(symbol: symbol, date: date - 7.days) # previous-week fallback
price = nil unless price # caller decides: skip record, mark unavailable
end Prevention
- Normalize requested dates to trading days (skip weekends; optionally holidays per exchange calendar)
- For young listings, check the security's first-trade date before requesting prices
- Cache negative lookups briefly so repeated misses don't re-hit the provider
- Treat 'no price' as an expected data gap in backfill jobs, not a fatal sync failure
When it happens
Trigger: Calling fetch_security_price(symbol:, date:) with a date that precedes the security's first trading day (IPO, recently listed ETF); requesting a date on a non-trading day (weekend/holiday) where Yahoo returns no bars at all in the 10-day lookback; querying a delisted symbol whose chart has no data in the window; using an unnormalized or wrong-exchange symbol that resolves to a different/empty instrument.
Common situations: Backfilling historical balances for securities bought before the user's broker recorded quotes; importing old trades where the transaction date is a Saturday; typo'd ticker or wrong exchange_operating_mic mapping the symbol to an empty series; Yahoo silently trimming ranges for young listings.
Related errors
- No prices found for security #{symbol} on date #{date}
- Could not save that passkey or security key. Please try agai
- Could not sync Akahu connection
- Enable Banking provider is not configured
- Enable Banking session is not valid or has expired
AI-assisted analysis of we-promise/sure@e69894adb9 (2026-08-21).
Data as JSON: /api/errors/f3e7de5bcd45f5e8.
Report an issue: GitHub.