Export errorHandler middleware.