Repository navigation
Foundry CLI 0.2.1 – Standardized Response & Error Handling
🚀 Release v0.2.1
This release introduces a major improvement in how responses and errors are handled across the application, improving consistency, maintainability, and architectural separation.
✔ Introduced a standardized Result pattern in the application layer for handling success and failure scenarios
✔ Replaced exception-driven business logic with explicit result-based flow control
✔ Implemented structured error handling using Error and ErrorType for better semantic clarity
✔ Decoupled application logic from HTTP concerns (no direct status handling outside controllers)
✔ Simplified controllers by centralizing error-to-HTTP mapping (MapError)
✔ Refactored validation flow to return consistent and predictable responses
✔ Improved overall code readability and testability
Business rule errors are no longer handled via exceptions. Instead, they are returned through the Result pattern. Exceptions are now reserved for unexpected or infrastructure-related failures and are handled by middleware.
This is still a pre-release version. While the new response pattern is stable, further refinements and standardizations (such as response extensions and validation pipelines) may be introduced in future iterations.