feat: validate signers have signature fields before distribution (#2411)

API users were inadvertently sending documents without signature fields,
causing confusion for recipients and breaking their signing flows.

- Add getRecipientsWithMissingFields helper in recipients.ts
- Add server-side validation in sendDocument to block distribution
- Fix v1 API to return 400 instead of 500 for validation errors
- Consolidate UI signature field checks to use isSignatureFieldType
- Add E2E tests for both v1 and v2 APIs
This commit is contained in:
Lucas Smith
2026-01-26 15:22:12 +11:00
committed by GitHub
parent b538580a1e
commit 0a3e0b8727
19 changed files with 1031 additions and 67 deletions
+1 -6
View File
@@ -1041,12 +1041,7 @@ export const ApiContractV1Implementation = tsr.router(ApiContractV1, {
},
};
} catch (err) {
return {
status: 500,
body: {
message: 'An error has occured while sending the document for signing',
},
};
return AppError.toRestAPIError(err);
}
}),