Skip to main content
Tartarus includes a robust error-handling system designed to provide clear, actionable feedback to users while maintaining detailed logs for developers. This system is modularized into three key components.

Custom Responses for Errors

Each error in Tartarus is mapped to a specific JSON response, to guarantee consistency and clarity. These responses are customised based on use-cases
Logs:
Logs:

Custom Exception Handlers

Tartarus uses custom exception handlers to intercept and manage errors raised within the application. These handlers: Convert exceptions into structured JSON responses.
Map specific exceptions to appropriate HTTP status codes.
Ensure seamless communication of error details to users.

Middleware for Unified Error Responses

A dedicated middleware intercepts unhandled errors and formats them into a consistent JSON structure, presented in a user-friendly format.

Common Errors