Custom Responses for Errors
Each error in Tartarus is mapped to a specificJSON response, to guarantee consistency and clarity. These responses are customised based on use-cases
Example: Incorrect Limit
Example: Incorrect Limit
Example: Incorrect Query parameter
Example: Incorrect Query parameter
Custom Exception Handlers
Tartarus uses custom exception handlers to intercept and manage errors raised within the application. These handlers: Convert exceptions into structuredJSON 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 consistentJSON structure, presented in a user-friendly format.