{"record":{"id":"30d29fa67224b62a","repo":"we-promise/sure","slug":"response-error-message","errorCode":null,"errorMessage":"{response.error.message}","messagePattern":"\\{response\\.error\\.message\\}","errorType":"exception","errorClass":"Property::AvmImport::Error","httpStatus":null,"severity":"error","filePath":"app/models/property/avm_import.rb","lineNumber":31,"sourceCode":"    @name = name\n    @address_attributes = address_attributes\n  end\n\n  # Step 1: validates the inputs, then spends one provider request. Returns\n  # the fetched Provider::PropertyValuationConcept::PropertyValuation.\n  def lookup\n    validate_inputs!\n\n    provider = Provider::Registry.for_concept(:property_valuations).get_provider(provider_key)\n    raise Error.new(I18n.t(\"providers.property_valuation.not_configured\")) if provider.nil?\n\n    response = provider.fetch_property_valuation(\n      line1: address_attributes[:line1],\n      locality: address_attributes[:locality],\n      region: address_attributes[:region],\n      postal_code: address_attributes[:postal_code]\n    )\n    raise Error.new(response.error.message) unless response.success?\n\n    response.data\n  end\n\n  # Step 2: creates the active property account from the user-confirmed\n  # valuation data. No provider request is made here.\n  def create_account(data)\n    validate_inputs!\n\n    account = nil\n    Account.transaction do\n      account = family.accounts.create!(\n        name: name,\n        balance: 0,\n        currency: data.currency,\n        status: \"draft\",\n        owner: owner,\n        accountable: Property.new(","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/we-promise/sure/blob/e69894adb92547273377398c15f45c979cd9416a/app/models/property/avm_import.rb#L13-L49","documentation":"StandardError raised by RedbarkItem#import_latest_redbark_data when redbark_provider resolves to nil — the item has no working Redbark (provider) connection, typically because OAuth credentials are missing or were revoked. It logs to Rails.logger before raising, and the rescue captures a DebugLogEntry (category provider_sync) then re-raises. Message text comes from I18n redbark_items.errors.provider_not_configured.","triggerScenarios":"Scheduled or manual import running on a RedbarkItem whose provider OAuth tokens were revoked or expired without refresh; provider record removed; item soft-deleted (scheduled_for_deletion) but a queued job still executes; env missing Redbark credentials so provider instantiation fails.","commonSituations":"User disconnects the Redbark integration while syncs are queued; tokens expiring during a long-lived deployment; test/staging environments without Redbark configured; job retries racing destroy_later.","solutions":["Reconnect Redbark via settings to restore the provider/OAuth link","Verify the provider record and credentials exist for the family (check DebugLogEntry provider_sync entries for the cause)","Make sync jobs no-op when redbark_provider is nil instead of raising","Cancel queued import jobs when an item is marked scheduled_for_deletion"],"exampleFix":"# before\nRedbarkItem.find(id).import_latest_redbark_data(sync: sync)\n\n# after\nitem = RedbarkItem.find(id)\nreturn Rails.logger.info(\"Skipping RedbarkItem #{id}: provider missing\") unless item.redbark_provider\nitem.import_latest_redbark_data(sync: sync)","handlingStrategy":"validation","validationCode":"return if item.scheduled_for_deletion?\nreturn Rails.logger.info(\"skip: redbark not configured\") unless item.redbark_provider","typeGuard":null,"tryCatchPattern":"begin\n  item.import_latest_redbark_data(sync: sync)\nrescue StandardError => e\n  raise unless e.message == I18n.t(\"redbark_items.errors.provider_not_configured\")\n  sync&.update!(status: :error, status_text: \"Redbark not connected — reconnect required\")\nend","preventionTips":["Guard sync jobs on redbark_provider presence","Drop scheduled jobs when the integration is disconnected","Monitor DebugLogEntry provider_sync entries for root causes of missing providers"],"tags":["redbark","oauth","provider-not-configured","sync"],"backgroundTag":"provider-not-configured","analyzedSha":"e69894adb92547273377398c15f45c979cd9416a","analyzedAt":"2026-08-21T18:22:41.165Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}