Implement global error handling for the API
Implement global error handling for the API