Skip to content

Improve error message when a soft-deleted form gets re-submitted #794

Closed
getodk/central-backend
#1316
@dbemke

Description

@dbemke

Action to take

In #794 (comment), we agreed to add an improved error message in Central for this case.

If Central receives a submission with an instanceID it recognizes as being soft-deleted, it should return a new problem and the error text:

This submission has been deleted. You may not resubmit it.

Problem description

Re-submitting a submission which was deleted

URL of the page

https://staging.getodk.cloud/

Steps to reproduce the problem

  1. In Collect send a submission of a form.
  2. In Central delete the submission.
  3. In Collect go to "Ready to send- Change View- Show Sent and UnsentForms”.
  4. Select the sent submission and tap "Send Selected”

Screenshot

sendSentDeletedSub

Expected behavior

From the thread in collect slack- Ln :
"When re-submitting a deleted submission, here are some reasonable outcomes I can think of:

  • Central accepts the submission but doesn’t do anything with it (behavior when a submission isn’t deleted)
  • Central accepts the submission and un-deletes it
  • Central rejects the submission with an error saying the submission has been received and then deleted (similar to the second case but with a better error message)"

Central version shown in version.txt

https://staging.getodk.cloud/
versions:
2e5c4f7 (v2024.2.1-3-g2e5c4f7)
+4a5a9ff81efff48a1500214d9c826b590c9ddaed client (v2024.2.1-16-g4a5a9ff8)
+746ff058d32d968f13cf4e7b0a48b81f88fb21df server (v2024.2.0-79-g746ff058)

Metadata

Metadata

Assignees

Labels

backendRequires a change to the API serverbehavior verifiedBehavior has been manually verifiedbug

Type

No type

Projects

Status

✅ done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions