Error Response Structure
A URI reference that identifies the problem typeExample:
about:blankA short, human-readable summary of the problem typeExample:
Validation FailedThe HTTP status code for this occurrence of the problemExample:
400A human-readable explanation specific to this occurrence of the problemExample:
username: username is requiredThe timestamp when the error occurredExample:
2024-01-15T10:30:00Additional context-specific properties may be included based on the error typeExample:
userId for User Not Found errorsCommon Error Types
Validation Failed (400 Bad Request)
Returned when request validation fails. Thedetail field contains information about which fields failed validation.
Example: Missing required field
User Not Found (404 Not Found)
Returned when attempting to access or modify a user that doesn’t exist. Includes theuserId property.
User Already Exists (409 Conflict)
Returned when attempting to register a user with a username or email that already exists in the system.Internal Server Error (500)
Returned when an unexpected error occurs on the server.Validation Rules Summary
Username
- Required (cannot be blank)
- Length: 3-50 characters
- Must be unique
- Immutable after creation
- Required (cannot be blank)
- Must be valid email format
- Must be unique
First Name / Last Name
- Required (cannot be blank)
- Maximum length: 100 characters
Role
- Required (cannot be null)
- Must be one of:
ADMIN,USER,GUEST