Enhanced Error Handling & Response Management
Release v0.2.0 - Enhanced Error Handling & Response Management π
This release focuses on improving error handling, response management, and overall system robustness.
π― Key Enhancements
Error Handling & Logging
- Enhanced error handling with detailed stack traces in non-production environments
- Improved Sentry integration with better context capture and error tracking
- Added centralized error logging with full traceback support
- New error types for common scenarios:
ManagedError.validation_error()ManagedError.not_found()ManagedError.unauthorized()ManagedError.forbidden()ManagedError.server_error()ManagedError.service_error()
Response Management
- Standardized response formatting for success and error cases
- Automatic metadata enrichment including timestamps and environment info
- Intelligent response data handling with empty field cleanup
- Support for both JSON and plain text error responses
Route Management
- Improved route discovery with better error handling
- Enhanced route registration with automatic wrapping of handlers
- Added support for route-specific configuration options
- New core routes for health checks and application info
Configuration & Logging
- Added YAML-based application configuration
- Enhanced logging configuration with environment awareness
- Improved CORS configuration with flexible origin settings
- Better environment variable handling
π§ Technical Improvements
- Type hints and validation throughout the codebase
- Better request data handling and validation
- Enhanced security with proper error information masking in production
- Improved module importing and route discovery
π Documentation
- Added detailed docstrings for all major components
- Improved code examples in route decorators
- Better type annotations for IDE support
π Bug Fixes
- Fixed route discovery in nested directories
- Improved error handling for malformed requests
- Better cleanup of temporary resources
- Fixed metadata merging in error responses
π₯ Breaking Changes
- Changed error response format to be more consistent
- Updated route discovery mechanism
- Modified request validation approach
π¦ Dependencies
- Flask 2.0.3 or higher
- Werkzeug 2.2 or higher
- Sentry SDK with Flask integration
- PyYAML 6.0+
- Pydantic 2.0+
For detailed usage instructions, see the README.md
Full Changelog: v0.1.0...v0.2.0