{"record":{"id":"db230c71a6bda10c","repo":"docusealco/docuseal","slug":"not-found-db230c","errorCode":null,"errorMessage":"Not found","messagePattern":"Not found","errorType":"exception","errorClass":"ActionController::RoutingError","httpStatus":404,"severity":"warning","filePath":"app/controllers/submit_form_controller.rb","lineNumber":97,"sourceCode":"\n      return render json: { error: I18n.t('form_is_view_only') }, status: :unprocessable_content\n    end\n\n    Submitters::SubmitValues.call(@submitter, params, request)\n\n    head :ok\n  rescue Submitters::SubmitValues::RequiredFieldError => e\n    Rollbar.warning(\"Required field #{@submitter.id}: #{e.message}\") if defined?(Rollbar)\n\n    render json: { field_uuid: e.message }, status: :unprocessable_content\n  rescue Submitters::SubmitValues::ValidationError => e\n    Rollbar.warning(\"Validation error #{@submitter.id}: #{e.message}\") if defined?(Rollbar)\n\n    render json: { error: e.message }, status: :unprocessable_content\n  end\n\n  def completed\n    raise ActionController::RoutingError, I18n.t('not_found') if @submitter.account.archived_at?\n\n    return if Submitters::AuthorizedForForm.call(@submitter, current_user, request)\n\n    redirect_to submit_form_path(params[:submit_form_slug])\n  end\n\n  def success; end\n\n  def delegated\n    submitter_version = SubmitterVersion.find_by!(slug: params[:slug] || params[:submit_form_slug])\n\n    @submitter = submitter_version.submitter\n  end\n\n  private\n\n  def maybe_require_link_2fa\n    return if Submitters::AuthorizedForForm.pass_link_2fa?(@submitter, current_user, request)","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/docusealco/docuseal/blob/004a22c1c88109c7ba0b567df011a8cb13894001/app/controllers/submit_form_controller.rb#L79-L115","documentation":"SubmitFormController#completed raises 404 when the submitter's account is archived, hiding the signing-completion page of cancelled/deleted accounts. For submitters this surfaces as the completion page not existing after they finish, which typically means the account was archived between sending and completing.","triggerScenarios":"A submitter opens their completion link after the owning account was archived; delayed email opens hitting archived accounts.","commonSituations":"Tenant cancelled mid-signing-cycle; trial expiry during an in-flight envelope; links re-opened from old emails.","solutions":["Restore the account if signers still need completion pages.","As operator, avoid archiving accounts with submissions in flight.","Export in-flight documents before archiving so signers' records survive."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"redirect_to root_path, alert: 'account unavailable' if submitter.account.archived_at?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check account state before dispatching completion links","Finish or export in-flight submissions before archival","Monitor 404s on completion routes to catch late signers"],"tags":["rails","not-found","archived-account","submit-form"],"backgroundTag":"http-404-not-found","analyzedSha":"004a22c1c88109c7ba0b567df011a8cb13894001","analyzedAt":"2026-08-21T13:38:23.343Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}