fix: handle completion when already signed (#3159)

Previously attempting to complete a document which is already completed
you'd get a generic error toast. Now when completing a document that you
have already completed you are redirected to the completed page.

Handles cases where two mutations managed to fire racing eachother.
This commit is contained in:
Lucas Smith
2026-08-10 09:25:41 +10:00
committed by GitHub
parent d6cf3fec4b
commit fc95ee9ead
5 changed files with 77 additions and 18 deletions
+7
View File
@@ -36,6 +36,13 @@ export enum AppErrorCode {
*/
ENVELOPE_TSP_LOCKED = 'ENVELOPE_TSP_LOCKED',
/**
* A completion request was made for a recipient that has already signed.
* Thrown for retried, stale or concurrent duplicate submissions so callers
* can resolve them idempotently instead of surfacing an error.
*/
RECIPIENT_ALREADY_SIGNED = 'RECIPIENT_ALREADY_SIGNED',
/**
* A signer recipient does not have a signature field assigned. Thrown when
* distributing an envelope or using a direct template where at least one