What are some best practices for error handling in Node.js?

Best practices include using try-catch blocks with async/await, implementing centralized error handling middleware in Express, returning appropriate HTTP status codes, logging errors for monitoring, and providing user-friendly error messages. For example, handling errors globally in an Express app:

app.use((err, req, res, next) => {
  console.error(err.stack);
  res.status(err.status || 500).send('Something went wrong!');
});