Repository navigation
Message Themes
The message themes in The Wall API provide structured, reusable messages for various components, including success messages, errors, API responses, and OpenAPI documentation. This page outlines the different categories of message themes and their purpose in the system.
-
The message themes are located in the
message_themes/folder. -
Their purpose is to ensure uniform messaging across all API endpoints, making it easier to maintain clear, structured responses.
-
Each category contains predefined constants or functions that generate dynamic messages based on input parameters.
| Theme Name | Description |
|---|---|
base.py |
General-purpose status responses like "OK", "NOK", and "Done!". |
errors.py |
Standardized error messages for validation failures, authentication errors, and API issues. |
info.py |
Informational messages indicating processing states, such as "We're processing your request. Please check back shortly.". |
success.py |
Confirmation messages for successful operations, (e.g., file uploads and cost retrievals). |
openapi.py |
Descriptive messages used in API documentation (e.g., endpoint summaries and explanations). |
-
Static Messages:
USER_MANAGEMENT_TAG = 'User Management' USER_MANAGEMENT_TAG_DESCRIPTION = 'Manage users, authentication, and passwords'
-
Dynamic Messages:
def file_limit_per_user_reached(file_limit: int) -> str: return f'File limit of {file_limit} per user reached.' def request_was_throttled(wait_seconds: int) -> str: return f'Request was throttled. Expected available in {wait_seconds} seconds.'
The message themes ensure consistency across the application, reducing redundancy and improving maintainability.
By centralizing all messages, API responses remain structured, consistent, and easier for developers to interpret and debug.
Next: API Throttling
Back to: Error Handling
Return to Top
DTS Index
Home Page
📌 Notable Technical Sections
👤 Author
LinkedIn: Aleksandar Dimitrov
Yahoo: sasho_1983@yahoo.com