Skip to Content
ModulesAuthenticationError Handling & Response Codes

Error Handling & Response Codes

This document describes the standardized approach to error handling and response codes within the authentication system. It outlines the HTTP status codes used for various scenarios, the taxonomy of error types, and the global exception handling mechanism. The goal is to provide clear, consistent, and actionable feedback to clients and developers, ensuring robust and predictable API behavior.

🚫

Note: The current system has limited exception handling and may not provide detailed or consistent error responses for all scenarios.

HTTP Status Codes

Status CodeUsageExample Scenarios
200 OKSuccessful operationsLogin, password reset success
400 Bad RequestClient input errorsInvalid JSON, validation failures
401 UnauthorizedAuthentication failuresInvalid credentials, expired tokens
403 ForbiddenAuthorization failuresInsufficient permissions
404 Not FoundResource not foundInvalid endpoints
409 ConflictResource conflictsUsername already exists
429 Too Many RequestsRate limitingExceeded request limits
500 Internal Server ErrorServer errorsDatabase/system errors

Global Exception Handling

Last updated on