{"record":{"id":"67129aaee939cc79","repo":"docusealco/docuseal","slug":"not-found-67129a","errorCode":null,"errorMessage":"Not found","messagePattern":"Not found","errorType":"http","errorClass":"ActionController::RoutingError","httpStatus":404,"severity":"warning","filePath":"app/controllers/submissions_preview_controller.rb","lineNumber":26,"sourceCode":"  prepend_before_action :maybe_redirect_com, only: %i[show completed]\n\n  TTL = 40.minutes\n\n  def show\n    @sig_submitter = Submitter.find_signed(params[:sig], purpose: :download_completed) if params[:sig].present?\n\n    signature_valid =\n      if @sig_submitter && @sig_submitter.submission.slug == params[:slug]\n        @submission = @sig_submitter.submission\n\n        true\n      else\n        @sig_submitter = nil\n      end\n\n    @submission ||= Submission.find_by!(slug: params[:slug])\n\n    raise ActionController::RoutingError, I18n.t('not_found') if @submission.account.archived_at?\n\n    if !@submission.completed_at? && !signature_valid &&\n       (!current_user || !current_ability.can?(:read, @submission))\n      raise ActionController::RoutingError, I18n.t('not_found')\n    end\n\n    if use_signature?(@submission) && !signature_valid\n      Rollbar.info(\"TTL: #{@submission.id}\") if defined?(Rollbar)\n\n      return redirect_to submissions_preview_completed_path(@submission.slug)\n    end\n\n    @submission = Submissions.preload_with_pages(@submission)\n\n    render 'submissions/show', layout: 'plain', locals: { is_preview: true }\n  end\n\n  def completed","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/docusealco/docuseal/blob/004a22c1c88109c7ba0b567df011a8cb13894001/app/controllers/submissions_preview_controller.rb#L8-L44","documentation":"SubmissionsPreviewController#show raises 404 when the submission's account is archived (archived_at set) - an intentionally flat denial that applies regardless of authentication or signature validity. Archived accounts' documents are hidden entirely, and the 404 avoids confirming anything exists. The submission was found by slug first, so the slug is right; the account is gone.","triggerScenarios":"Requesting the preview page of any submission whose account has archived_at set - direct link, old bookmark, or indexed URL.","commonSituations":"Cancelled subscriptions or deleted tenants; compliance-driven archival; old document links resurfacing months later.","solutions":["Restore (unarchive) the account if the document must become reachable again.","Accept the denial as designed and export needed documents before archiving accounts.","Verify you are not mixing up environments - the same slug may exist elsewhere."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# before showing or exporting links, gate on account state\nreturn head :gone if submission.account.archived_at?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Export documents before archiving accounts","Purge or notify on external links when archiving","Monitor 404 spikes to detect archived-account link rot"],"tags":["rails","not-found","archived-account","authorization","submission-preview"],"backgroundTag":"http-404-not-found","analyzedSha":"004a22c1c88109c7ba0b567df011a8cb13894001","analyzedAt":"2026-08-21T13:38:23.343Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}