fix: improve error handling and validation
- Add centralized exception classes - Validate signature request status before signing - Check contract status before approval/rejection - Add exception handlers to FastAPI app - Update tests for new validation logic Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
656f596d7e
commit
ae72b180e5
6 files changed
+194
-9
No files matched your search
@@ -76,6 +76,9 @@ class TestContractService:
|
||||
created_by=1,
|
||||
)
|
||||
|
||||
# Submit for approval first
|
||||
await service.submit_for_approval(contract.id)
|
||||
|
||||
approval = await service.approve_contract(contract.id, 1, "同意")
|
||||
|
||||
assert approval.status == ContractStatus.APPROVED
|
||||
|
||||
Reference in new issue
Block a user