Error Handling

Centralized HTTP error handling by returning errors from handlers and middleware.