Add Error Handling and Logging for Invalid Paths/Methods
This pull request implements comprehensive error handling, logging, and monitoring capabilities for the Animals API. Key changes include:
- Structured Error Handling
- Introduces standardized error types and responses
- Implements consistent error formatting across all endpoints
- Adds detailed error documentation
- Advanced Logging System
- Adds structured JSON logging using zerolog
- Implements request/response logging
- Provides detailed logging documentation and best practices
- Request Tracing
- Adds correlation ID tracking across requests
- Implements middleware for request tracing
- Enables better debugging and monitoring capabilities
- Middleware Enhancements
- Adds method validation middleware
- Implements error handling middleware
- Adds request logging middleware
- Adds correlation ID middleware
- Documentation
- Adds comprehensive troubleshooting guide
- Includes detailed logging documentation
- Provides error response format documentation
These changes significantly improve the API's observability, maintainability, and debugging capabilities while providing a better developer experience.