Skip to main content

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 outcomeHTTP mappingBody convention
Query success200Plain JSON array/object
Mutation success200DTO, list, or plain success string
Validation/application invalid400Usually a JSON string; missing-tenant middleware uses a message object
Not found404Message object
Conflict409Message object
Forbidden result403Framework forbid response
Authentication/authorization boundaryBoundary-dependent401/403 behavior requires deployed-route confirmation
Unhandled exceptionHost defaultNo 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.cs
  • microservices/src/leave-service/Application/Common/Cqrs.cs
  • microservices/src/leave-service/Program.cs

See Also

Keywords

  • Leave API
  • Leave API Response and Error Model
  • Integration

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly