Leave API Response and Error Model
Summary
Leave uses plain DTO/list responses and a lightweight application result translated to status-specific responses; RFC Problem Details is not implemented.
Audience
Frontend/backend developers, QA, support, and implementation partners.
Overview
| Source outcome | HTTP mapping | Body convention |
|---|---|---|
| Query success | 200 | Plain JSON array/object |
| Mutation success | 200 | DTO, list, or plain success string |
| Validation/application invalid | 400 | Usually a JSON string; missing-tenant middleware uses a message object |
| Not found | 404 | Message object |
| Conflict | 409 | Message object |
| Forbidden result | 403 | Framework forbid response |
| Authentication/authorization boundary | Boundary-dependent | 401/403 behavior requires deployed-route confirmation |
| Unhandled exception | Host default | No stable public body documented |
No Leave endpoint returns ApiResponse<T>. Invalid state, Attendance conflict, Workflow-start failure, and most dependency failures map to 400; workflow-managed direct decisions and callback state mismatches map to 409.
Source References
microservices/src/leave-service/Api/LeaveEndpoints.csmicroservices/src/leave-service/Application/Common/Cqrs.csmicroservices/src/leave-service/Program.cs
Related Articles
See Also
Keywords
- Leave API
- Leave API Response and Error Model
- Integration
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly