@mulmoclaude/accounting-plugin 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -1834,17 +1834,15 @@ function asyncHandler(namespace, fallbackMessage, handler) {
1834
1834
  try {
1835
1835
  await handler(req, res);
1836
1836
  } catch (err) {
1837
- const expressReq = req;
1838
- const expressRes = res;
1839
1837
  log.error(namespace, "handler threw", {
1840
- route: expressReq.path,
1838
+ route: req.path,
1841
1839
  error: errorMessage(err)
1842
1840
  });
1843
- if (expressRes.headersSent) {
1841
+ if (res.headersSent) {
1844
1842
  next(err);
1845
1843
  return;
1846
1844
  }
1847
- expressRes.status(500).json({ error: fallbackMessage });
1845
+ res.status(500).json({ error: fallbackMessage });
1848
1846
  }
1849
1847
  };
1850
1848
  }