{"record":{"id":"1350feb3d1a873d2","repo":"we-promise/sure","slug":"realie-did-not-return-a-property-for-this-address","errorCode":null,"errorMessage":"Realie did not return a property for this address.","messagePattern":"Realie did not return a property for this address\\.","errorType":"exception","errorClass":"Provider::Realie::Error","httpStatus":null,"severity":"warning","filePath":"app/models/provider/realie.rb","lineNumber":63,"sourceCode":"  # Realie model (AVM) value, so no separate valuation request is needed.\n  def fetch_property_valuation(line1:, locality: nil, region: nil, postal_code: nil)\n    with_provider_response do\n      throttle_request\n      record_monthly_request!\n\n      # The address lookup endpoint accepts only the street address and\n      # 2-letter state code — filtering by city additionally requires a\n      # county, which the property address form doesn't collect.\n      response = client.get(\"#{base_url}/api/public/property/address/\") do |req|\n        req.params[\"address\"] = line1.to_s.strip\n        req.params[\"state\"] = region.to_s.strip.upcase\n      end\n\n      parsed = JSON.parse(response.body)\n      records = parsed[\"property\"]\n      records = [ records ] unless records.is_a?(Array)\n      records = records.reject(&:blank?)\n      raise Error.new(I18n.t(\"providers.realie.errors.no_property\")) if records.empty?\n\n      # A street+state query can return several candidates across different\n      # cities; pick the first one consistent with the entered city/ZIP.\n      record = records.find { |candidate| location_match?(candidate, locality: locality, postal_code: postal_code) }\n      raise Error.new(I18n.t(\"providers.realie.errors.location_mismatch\")) if record.nil?\n\n      # Realie returns modelValue: 0 when it couldn't produce an AVM\n      # estimate, so zero counts as absent and falls back to the assessed\n      # total market value.\n      valuation = [ record[\"modelValue\"], record[\"totalMarketValue\"] ].find { |value| value.present? && value.to_d.positive? }\n      raise Error.new(I18n.t(\"providers.realie.errors.no_valuation\")) if valuation.nil?\n\n      PropertyValuation.new(\n        valuation: BigDecimal(valuation.to_s),\n        currency: \"USD\",\n        property_type: subtype_for_use_code(record[\"useCode\"]),\n        year_built: record[\"yearBuilt\"],\n        area_value: record[\"buildingArea\"],","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/we-promise/sure/blob/e69894adb92547273377398c15f45c979cd9416a/app/models/provider/realie.rb#L45-L81","documentation":"Raised in Provider::Realie#fetch_property_valuation when the address lookup (GET /api/public/property/address/ with address + state params) succeeded but returned no usable records: parsed[\"property\"] was nil, an empty array, or contained only blank entries. The user-facing copy comes from I18n providers.realie.errors.no_property, so this is an expected 'no data' outcome, not an integration bug.","triggerScenarios":"Street address not present in Realie's coverage (sparse counties, rural parcels); malformed or abbreviated street line ('123 Main St Nw Apt 2' vs normalized form); wrong 2-letter state code; newly constructed address not yet in the dataset.","commonSituations":"Users typing free-text addresses with typos; coverage gaps for small towns; unit numbers confusing the matcher; state code lowercase or full name passed in (the code upcases region, but a full name like 'Washington' still fails since it must be 2 letters).","solutions":["Normalize the inputs before calling: strip the street line, require a valid 2-letter state code, and keep the unit out of line1 if possible.","Retry once with a simplified address variant (drop directional suffixes like 'Nw', remove unit designators).","Fall back to another valuation provider or mark the property as manually appraisable when Realie has no coverage for the area.","Check Realie docs/coverage notes for the state — if unsupported, gate the provider by state in the UI."],"exampleFix":"# before\nvaluation = realie.fetch_property_valuation(\n  line1: \"123 Main St Nw Apt 2B\", region: \"Washington\"\n) # -> no_property\n\n# after\nline1 = address.line1.strip.sub(/\\b(?:apt|unit|ste)\\s*\\S+\\b/i, \"\")\nregion = States.abbreviation_for(address.region) # ensure 2-letter code\nraise ArgumentError, \"state required\" if region.blank?\nvaluation = realie.fetch_property_valuation(line1: line1, region: region, locality: address.city, postal_code: address.zip)","handlingStrategy":"fallback","validationCode":"line1 = line1.to_s.strip\nregion = region.to_s.strip.upcase\nraise ArgumentError, \"2-letter state required\" unless region.match?(/\\A[A-Z]{2}\\z/)\nraise ArgumentError, \"street required\" if line1.length < 5","typeGuard":null,"tryCatchPattern":"begin\n  valuation = realie.fetch_property_valuation(line1:, locality:, region:, postal_code:)\nrescue Provider::Realie::Error => e\n  raise unless e.message == I18n.t(\"providers.realie.errors.no_property\")\n  valuation = rentcast.fetch_property_valuation(line1:, locality:, region:, postal_code:)\nend","preventionTips":["Normalize the street line (strip unit designators, drop directionals on retry) before the call.","Validate state is a 2-letter code and street is non-trivial client-side.","Gate Realie by coverage per state and fall back to another AVM provider where coverage is thin."],"tags":["realie","property-valuation","no-results","address-lookup","user-input"],"backgroundTag":"no-search-results","analyzedSha":"e69894adb92547273377398c15f45c979cd9416a","analyzedAt":"2026-08-21T18:22:41.165Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}