{"record":{"id":"f3e7de5bcd45f5e8","repo":"we-promise/sure","slug":"could-not-sign-in-with-that-passkey-please-try-ag","errorCode":null,"errorMessage":"Could not sign in with that passkey. Please try again or use your password.","messagePattern":"Could not sign in with that passkey\\. Please try again or use your password\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/javascript/controllers/webauthn_authentication_controller.js","lineNumber":119,"sourceCode":"  }\n\n  abortConditionalMediation() {\n    this.abortController?.abort();\n    this.abortController = null;\n  }\n\n  // Takes a signal so the conditional flow's request can be cancelled. The\n  // challenge rides in the session cookie, so a response whose Set-Cookie never\n  // lands cannot overwrite the challenge a manual click just minted.\n  async fetchOptions(signal) {\n    const response = await fetch(this.optionsUrlValue, {\n      method: \"POST\",\n      headers: this.headers,\n      credentials: \"same-origin\",\n      signal,\n    });\n\n    if (!response.ok) throw new Error(await this.errorMessage(response));\n\n    return response.json();\n  }\n\n  async verifyCredential(credential) {\n    const response = await fetch(this.verifyUrlValue, {\n      method: \"POST\",\n      headers: this.headers,\n      credentials: \"same-origin\",\n      body: JSON.stringify({ credential }),\n    });\n\n    if (!response.ok) throw new Error(await this.errorMessage(response));\n\n    const result = await response.json();\n    window.location.href = result.redirect_url;\n  }\n}","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/we-promise/sure/blob/e69894adb92547273377398c15f45c979cd9416a/app/javascript/controllers/webauthn_authentication_controller.js#L101-L137","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before\nprice = provider.fetch_security_price(symbol: \"NVDA\", date: Date.parse(\"1998-01-01\"))\n\n# after\nprice = provider.fetch_security_price(symbol: \"NVDA\", date: trade_date)\nrescue Provider::YahooFinance::Error => e\n  Rails.logger.warn(\"No price for #{symbol} at #{trade_date}: #{e.message}\")\n  price = provider.fetch_security_price(symbol: symbol, date: trade_date - 7.days) # widen fallback\nend","handlingStrategy":"try-catch","validationCode":"# Before calling fetch_security_price\ntrading_day = date\ntrading_day -= 1.day while trading_day.wday == 0 || trading_day.wday == 6\nfirst_trade_date = Security.find_by!(symbol: symbol)&.listed_at&.to_date # if available\nif first_trade_date && trading_day < first_trade_date\n  Rails.logger.info(\"#{symbol} not listed on #{date}; skipping price lookup\")\nend","typeGuard":null,"tryCatchPattern":"begin\n  price = provider.fetch_security_price(symbol: symbol, date: date)\nrescue Provider::YahooFinance::Error => e\n  raise unless e.message.include?(\"No price found\")\n  price = provider.fetch_security_price(symbol: symbol, date: date - 7.days) # previous-week fallback\n  price = nil unless price # caller decides: skip record, mark unavailable\nend","preventionTips":["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"],"tags":["yahoo-finance","historical-prices","trading-day","ipo","market-data"],"backgroundTag":"no-historical-price-data","analyzedSha":"e69894adb92547273377398c15f45c979cd9416a","analyzedAt":"2026-08-21T18:22:41.165Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}