{"record":{"id":"177e0f618ee9d5e7","repo":"we-promise/sure","slug":"please-provide-a-name-and-a-complete-us-address-s","errorCode":null,"errorMessage":"Please provide a name and a complete US address (street, city, state, and ZIP code).","messagePattern":"Please provide a name and a complete US address \\(street, city, state, and ZIP code\\)\\.","errorType":"validation","errorClass":"Property::AvmImport::Error","httpStatus":null,"severity":"warning","filePath":"app/models/property/avm_import.rb","lineNumber":84,"sourceCode":"    end\n\n    account.auto_share_with_family! if family.share_all_by_default?\n    account\n  rescue ActiveRecord::RecordInvalid => e\n    raise Error.new(e.record.errors.full_messages.to_sentence.presence || e.message)\n  end\n\n  private\n    attr_reader :family, :owner, :provider_key, :name, :address_attributes\n\n    # The form marks these required, but a forged or JS-less submission can\n    # bypass that — validate locally before spending a monthly-budget request\n    # on a lookup that can't produce a property.\n    def validate_inputs!\n      missing = name.blank? ||\n        %i[line1 locality region postal_code].any? { |field| address_attributes[field].blank? }\n\n      raise Error.new(I18n.t(\"providers.property_valuation.missing_fields\")) if missing\n    end\nend\n","sourceCodeStart":66,"sourceCodeEnd":87,"githubUrl":"https://github.com/we-promise/sure/blob/e69894adb92547273377398c15f45c979cd9416a/app/models/property/avm_import.rb#L66-L87","documentation":"RateLimitedError raised in SimplefinItem::Importer when the SimpleFIN API's error messages include 'make fewer requests', 'only refreshed once every 24 hours', or 'rate limit' (case-insensitive). SimpleFIN refreshes an account's data at most once per 24 hours, so aggressive re-syncing is rejected server-side. The importer specifically classifies this as RateLimitedError (and emits a simplefin.rate_limited notification) so callers can back off instead of treating it as a fatal API error, which would take the :api_error path below.","triggerScenarios":"Triggering two imports for the same SimpleFIN item within the refresh window; a user clicking 'refresh' repeatedly; scheduled jobs and manual syncs racing; retry storms after partial failures re-hitting the accounts endpoint.","commonSituations":"Impatient users re-syncing right after a sync; cron schedules set tighter than 24h per item; multi-worker setups both picking the same item; testing against production SimpleFIN bridges.","solutions":["Wait for the 24-hour window to roll over before re-syncing this item","Catch RateLimitedError separately and mark the sync as rate-limited rather than failed, then reschedule with jittered delay","Persist last_refreshed_at per item and skip imports inside the window (guard before calling import)","Space out scheduled jobs so each item syncs at most once daily"],"exampleFix":"# before\nSimplefinItem.find(id).import_latest_data(sync: sync)\n\n# after\nbegin\n  SimplefinItem.find(id).import_latest_data(sync: sync)\nrescue Provider::Simplefin::RateLimitedError\n  sync.update!(status_text: \"Rate limited by SimpleFIN (24h refresh); retrying tomorrow\")\n  SimplefinItem::ImportJob.set(wait: 24.hours).perform_later(id)\nend","handlingStrategy":"retry","validationCode":"last = item.last_synced_at # or your persisted refresh timestamp\nif last && last > 23.hours.ago\n  Rails.logger.info(\"SimpleFIN 24h window active for item #{item.id}; skipping\")\n  return\nend","typeGuard":null,"tryCatchPattern":"begin\n  item.import_latest_data(sync: sync)\nrescue Provider::Simplefin::RateLimitedError\n  sync.update!(status_text: \"Rate limited by SimpleFIN; retrying after 24h refresh window\")\n  ImportJob.set(wait: 24.hours).perform_later(item.id)\nend","preventionTips":["Track last-refresh per SimpleFIN item and skip imports inside the 24h window","Schedule each item at most once daily with jitter","Rescue RateLimitedError separately from generic SimplefinError — it is recoverable by waiting, not by retrying now","Debounce user-triggered 'refresh now' buttons"],"tags":["simplefin","rate-limit","sync","backoff","banking"],"backgroundTag":"api-rate-limit-exceeded","analyzedSha":"e69894adb92547273377398c15f45c979cd9416a","analyzedAt":"2026-08-21T18:22:41.165Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}