fix: prevent recipients who already signed from rejecting documents (#3411)

This commit is contained in:
Catalin Pit
2026-09-30 16:19:20 +10:00
committed by GitHub
parent b8b98f70c0
commit f4105e47eb
@@ -51,6 +51,12 @@ export async function rejectDocumentWithToken({ token, id, reason, requestMetada
});
}
if (recipient.signingStatus !== SigningStatus.NOT_SIGNED) {
throw new AppError(AppErrorCode.INVALID_REQUEST, {
message: `Recipient ${recipient.id} has already actioned this document`,
});
}
assertRecipientNotExpired(recipient);
// Update the recipient status to rejected