Add error handler in controllers