Coding task · NestJS course · Module 6: Error Handling and Monitoring
DatabaseExceptionFilter
Create a filter for database exceptions with @Catch for QueryFailedError and EntityNotFoundError
Task
Complete the DatabaseExceptionFilter with @Catch(QueryFailedError, EntityNotFoundError) that differentiates exception types in catch() and returns the appropriate HTTP code (400 for QueryFailed, 404 for EntityNotFound)