Reference
Error Codes
Canonical error identifiers and validation audit codes returned by SamaySetu APIs.
Security & Operational Error Identifiers
| Identifier | HTTP Status | Schema | Meaning & Next Step |
|---|---|---|---|
AuthRequired | 401 | SecurityErrorResponse | Request omitted a valid JWT Bearer token or token expired (1 hour TTL). Re-authenticate via POST /auth/login. |
AccessDenied | 403 | SecurityErrorResponse | Authenticated caller lacks required permission or attempted cross-department access. Inspect rights with GET /admin/api/permissions/my-effective-permissions. |
MaintenanceMode | 503 | MaintenanceErrorResponse | Scheduled maintenance is active (maintenanceEnabled: true). Poll GET /api/public/maintenance-status or display message / expectedEndAt. |
Pre-Publish Timetable Validation Codes
Returned by GET /api/timetable/validate (TimetableValidationResponse) and POST /api/timetable/publish (PublishConflictResponse when HTTP 409 occurs):
Blocking Errors (Prevent Publishing)
NO_ENTRIES: No timetable draft entries exist for the requested division and academic year.TEACHER_HOURS_EXCEEDED: One or more assigned faculty members exceed their configuredmaxWeeklyHours.ROOM_DOUBLE_BOOKED: Physical classroom or lab overlap detected for the same day and period.
Informational Warnings (Allowed to Publish)
EMPTY_DAY: An academic working day (e.g.,SATURDAY) has zero scheduled entries.EMPTY_CORE_SLOT: A core period slot remains unallocated in the draft grid.TEACHER_HOURS_LOW: Assigned hours fall below the teacher's configuredminWeeklyHours.TEACHER_DAILY_HEAVY: A faculty member has an unusually high concentration of periods on one day.
Unique Constraint Messages (409 Conflict)
Duplicate domain identifiers return 409 Conflict (ErrorResponse), such as:
- Duplicate room number or room name (
"A record with room number 'CR-204' already exists.") - Duplicate course code or course name
- Duplicate department code or department name
