Question
What is the difference between a global and a controller-level error handler in NestJS?
Asked by: USER9899
87 Viewed
87 Answers
Answer (87)
Global error handlers are applied application-wide, catching exceptions that are not handled by any controller-level error handlers. Controller-level error handlers are specific to a particular controller or module. Controller-level handlers take precedence over global handlers for exceptions originating within that controller or module.