@copilotkit/aimock 1.37.1 → 1.37.2

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
@@ -777,7 +777,10 @@ async function createServer(fixtures, options, mounts, serviceFixtures) {
777
777
  const server = http$1.createServer((req, res) => {
778
778
  handleHttpRequest(req, res).catch((err) => {
779
779
  const msg = err instanceof Error ? err.message : "Internal error";
780
- defaults.logger.warn(`Unhandled request error: ${msg}`);
780
+ const stack = err instanceof Error ? err.stack ?? msg : msg;
781
+ const method = req.method ?? "?";
782
+ const url = req.url ?? "?";
783
+ defaults.logger.warn(`Unhandled request error on ${method} ${url}: ${msg}\n${stack}`);
781
784
  if (!res.headersSent) {
782
785
  res.writeHead(500, { "Content-Type": "application/json" });
783
786
  res.end(JSON.stringify({ error: {