@jaypie/express 1.2.4-rc15 → 1.2.4-rc16

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.
@@ -1796,12 +1796,12 @@ function expressHandler(handlerOrOptions, optionsOrHandler) {
1796
1796
  }
1797
1797
  }
1798
1798
  catch (error) {
1799
- log.fatal("Express encountered an error while sending the response");
1800
- log.var({ responseError: error });
1801
- // Log full stack trace for debugging
1802
- if (error instanceof Error && error.stack) {
1803
- log.error(error.stack);
1799
+ // Use console.error for raw stack trace to ensure it appears in CloudWatch
1800
+ if (error instanceof Error) {
1801
+ console.error("Express response error stack trace:", error.stack);
1804
1802
  }
1803
+ log.fatal(`Express encountered an error while sending the response: ${error instanceof Error ? error.message : String(error)}`);
1804
+ log.var({ responseError: error });
1805
1805
  }
1806
1806
  // Log response
1807
1807
  const extras = {};