Awesome Reviewers

Never swallow, locally render, or silently drop an error — always let it flow through the standard error-handling mechanism so it can be centrally logged, customized, and surfaced consistently. Concretely:

// Avoid: swallowing/forwarding the error yourself with a generic response
app.get('/note/:id', function (req, res) {
  try {
    var note = noteUseCase.getById(req.params.id);
    res.json(note);
  } catch (err) {
    res.status(404).json(err.message); // loses stack/logging, forces same status for all errors
  }
});

// Prefer: let the error flow to centralized error-handling middleware
app.get('/note/:id', function (req, res, next) {
  noteUseCase.getById(req.params.id, function (err, note) {
    if (err) return next(err); // centralized logging/status mapping happens here
    res.json(note);
  });
});

Following this standard keeps error handling predictable, centralizes logging/formatting concerns, and avoids both silent failures and duplicated inline error-response logic across handlers.