{"record":{"id":"29822aca8ac4db37","repo":"instructure/canvas-lms","slug":"unsupported-submission-type-for-vericite-integration","errorCode":null,"errorMessage":"Unsupported submission type for VeriCite integration: #{submission.submission_type}","messagePattern":"Unsupported submission type for VeriCite integration: #(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/vericite.rb","lineNumber":153,"sourceCode":"          paper_ext = a.extension\n          paper_type = a.content_type\n          if paper_ext.nil?\n            paper_ext = \"\"\n          end\n          paper_size = 100 # File.size(\n          responses[a.asset_string] = sendRequest(:submit_paper, { pid: paper_id, ptl: paper_title, pext: paper_ext, ptype: paper_type, psize: paper_size, pdata: a.open }.merge!(opts))\n        end\n      elsif submission.submission_type == \"online_text_entry\" && (asset_string.nil? || submission.asset_string == asset_string)\n        paper_id = Digest::SHA1.hexdigest submission.plaintext_body\n        paper_ext = \"html\"\n        paper_title = \"InlineSubmission\"\n        plain_text = \"<html>#{submission.plaintext_body}</html>\"\n        paper_type = \"text/html\"\n        paper_size = plain_text.bytesize\n\n        responses[submission.asset_string] = sendRequest(:submit_paper, { pid: paper_id, ptl: paper_title, pext: paper_ext, ptype: paper_type, psize: paper_size, pdata: plain_text }.merge!(opts))\n      else\n        raise \"Unsupported submission type for VeriCite integration: #{submission.submission_type}\"\n      end\n\n      responses.transform_values! do |res|\n        is_response_success?(res) ? { object_id: res[:returned_object_id] } : response_error_hash(res)\n      end\n\n      responses\n    end\n\n    def generateReport(submission, asset_string)\n      user = submission.user\n      assignment = submission.assignment\n      course = assignment.context\n      object_id = submission.vericite_data_hash.dig(asset_string, :object_id)\n      res = nil\n      res = sendRequest(:get_scores, oid: object_id, utp: \"2\", user:, course:, assignment:) if object_id\n      data = {}\n      if res","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/lib/vericite.rb#L135-L171","documentation":"VeriCite plagiarism provider's submitPaper handles attachment-based and online_text_entry submissions; any other submission_type falls through to the else and raises, since VeriCite has no payload mapping for it (mirrors the Turnitin limitation in lib/turnitin.rb).","triggerScenarios":"Calling submitPaper (via submit_at/plagiarism framework) with a submission of type online_quiz, online_url_entry, media_recording, or similar that is neither attachment-bearing nor 'online_text_entry'.","commonSituations":"VeriCite enabled on assignments accepting quiz or media submission types; plagiarism job queues processing heterogeneous assignments; orgs migrating from Turnitin with the same restricted type expectations.","solutions":["Restrict VeriCite-enabled assignments to file upload and text entry submission types","Filter unsupported submissions before enqueuing them to VeriCite","Handle the error in the plagiarism submission job and mark those submissions as skipped","Extend the branch to serialize additional types if VeriCite's API accepts them"],"exampleFix":"// before\nsubmission.submit_at(vericite) # raises for online_quiz\n// after\nSUPPORTED = %w[online_upload online_text_entry].freeze\nif SUPPORTED.include?(submission.submission_type)\n  submission.submit_at(vericite)\nelse\n  Rails.logger.warn(\"vericite skip: #{submission.submission_type}\")\nend","handlingStrategy":"validation","validationCode":"VERICITE_TYPES = %w[online_upload online_text_entry].freeze\nraise 'unsupported for vericite' unless VERICITE_TYPES.include?(submission.submission_type)","typeGuard":"def vericite_submittable?(submission) = %w[online_upload online_text_entry].include?(submission.submission_type)","tryCatchPattern":"begin\n  submission.submit_at(vericite_tool)\nrescue RuntimeError => e\n  raise unless e.message.start_with?('Unsupported submission type for VeriCite')\n  Rails.logger.warn(\"skipped: #{e.message}\")\nend","preventionTips":["Limit VeriCite-enabled assignments to supported submission types","Skip/flag unsupported types in the plagiarism job","Keep type lists in sync with the provider branch logic"],"tags":["vericite","plagiarism","unsupported-type"],"backgroundTag":"unsupported-enum-value","analyzedSha":"1c9f0bb8013ed69c4f2efe11fd483025469b7e6c","analyzedAt":"2026-09-15T20:33:18.891Z","contentChangedAt":"2026-09-15T20:33:18.891Z","schemaVersion":2},"datasetVersion":"2026-09-23T02:17:17.105Z"}