{"record":{"id":"83cf0da2ca062848","repo":"we-promise/sure","slug":"no-security-info-found-for-symbol","errorCode":null,"errorMessage":"No security info found for #{symbol}","messagePattern":"No security info found for #(.+?)","errorType":"exception","errorClass":"Provider::YahooFinance::Error","httpStatus":null,"severity":"error","filePath":"app/models/provider/yahoo_finance.rb","lineNumber":265,"sourceCode":"\n      # Check for auth errors in response body\n      if data.dig(\"quoteSummary\", \"error\", \"code\") == \"Unauthorized\"\n        # Clear cached crumb and retry once\n        clear_crumb_cache\n        cookie, crumb = fetch_cookie_and_crumb\n        response = authenticated_client(cookie).get(\"#{base_url}/v10/finance/quoteSummary/#{symbol}\") do |req|\n          req.params[\"modules\"] = \"assetProfile,price,quoteType\"\n          req.params[\"crumb\"] = crumb\n        end\n        data = JSON.parse(response.body)\n        if data.dig(\"quoteSummary\", \"error\", \"code\") == \"Unauthorized\"\n          raise AuthenticationError, \"Yahoo Finance authentication failed after crumb refresh\"\n        end\n      end\n\n      result = data.dig(\"quoteSummary\", \"result\", 0)\n\n      raise Error, \"No security info found for #{symbol}\" unless result\n\n      asset_profile = result[\"assetProfile\"] || {}\n      price_info = result[\"price\"] || {}\n      quote_type = result[\"quoteType\"] || {}\n\n      security_info = SecurityInfo.new(\n        symbol: symbol,\n        name: price_info[\"longName\"] || price_info[\"shortName\"] || quote_type[\"longName\"] || quote_type[\"shortName\"],\n        links: asset_profile[\"website\"],\n        logo_url: nil, # Yahoo doesn't provide reliable logo URLs\n        description: asset_profile[\"longBusinessSummary\"],\n        kind: map_security_type(quote_type[\"quoteType\"]),\n        exchange_operating_mic: exchange_operating_mic\n      )\n\n      security_info\n    rescue JSON::ParserError => e\n      raise Error, \"Invalid response format: #{e.message}\"","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/we-promise/sure/blob/e69894adb92547273377398c15f45c979cd9416a/app/models/provider/yahoo_finance.rb#L247-L283","documentation":"Provider::YahooFinance::Error raised in fetch_security_info when the quoteSummary response contains no result entry — the API answered successfully (auth passed) but returned an empty/absent quoteSummary.result array for the normalized symbol.","triggerScenarios":"Requesting info for an unknown, delisted, or renamed symbol; a symbol valid on one exchange but normalized to a Yahoo form that has no quoteSummary (suffix/prefix mismatches like 'ASML.AS' vs 'ASML'); symbols for asset types the endpoint doesn't summarize.","commonSituations":"Stored security symbols going stale after delisting/rename; symbols imported from another provider (Trading 212, Twelve Data) not matching Yahoo's format; OTC or thinly-traded tickers lacking quoteSummary modules.","solutions":["Search the symbol via search_securities to see Yahoo's canonical form and use that exact symbol","Confirm the ticker still exists on finance.yahoo.com — delisted symbols return empty results","Check normalize_symbol behavior for the given mic — pass the correct exchange_operating_mic so suffixes are applied properly","Rescue this error and mark the security as 'info unavailable' instead of failing the whole sync"],"exampleFix":"// before\ninfo = provider.fetch_security_info(symbol: symbol, exchange_operating_mic: mic)\n\n// after\nbegin\n  info = provider.fetch_security_info(symbol: symbol, exchange_operating_mic: mic)\nrescue Provider::YahooFinance::Error => e\n  raise unless e.message.include?(\"No security info found\")\n  matches = provider.search_securities(symbol)\n  canonical = matches.first\n  info = canonical ? provider.fetch_security_info(symbol: canonical.symbol, exchange_operating_mic: canonical.exchange_operating_mic) : nil\nend","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"begin\n  provider.fetch_security_info(symbol:, exchange_operating_mic:)\nrescue Provider::YahooFinance::Error => e\n  raise unless e.message.include?(\"No security info found\")\n  match = provider.search_securities(symbol).first\n  match ? provider.fetch_security_info(symbol: match.symbol, exchange_operating_mic: match.exchange_operating_mic) : nil\nend","preventionTips":["Resolve symbols through search_securities first and store Yahoo-canonical forms","Periodically revalidate stored symbols (renames/delistions) during syncs","Treat missing info as 'unavailable' rather than a hard sync failure"],"tags":["ruby","yahoo-finance","symbol-not-found","quote-summary","api"],"backgroundTag":"symbol-not-found","analyzedSha":"e69894adb92547273377398c15f45c979cd9416a","analyzedAt":"2026-08-21T18:22:41.165Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}