From 1820771f7474c576ad139709f12a10fb203e2a9e Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Sat, 3 Sep 2022 12:33:05 -0400 Subject: [PATCH] fix!: remove hide stack traces option --- README.md | 1 - src/config/commandOptions.js | 4 ---- src/config/defaultOptions.js | 1 - src/events/http/HttpServer.js | 4 ---- 4 files changed, 10 deletions(-) diff --git a/README.md b/README.md index 9b85cb94f..07324f86a 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,6 @@ All CLI options are optional: --dockerNetwork The network that the Docker container will connect to --dockerReadOnly Marks if the docker code layer should be read only. Default: true --enforceSecureCookies Enforce secure cookies ---hideStackTraces Hide the stack trace on lambda failure. Default: false --host -o Host name to listen on. Default: localhost --httpPort Http port to listen on. Default: 3000 --httpsProtocol -H To enable HTTPS, specify directory (relative to your cwd, typically your project dir) for both cert.pem and key.pem files diff --git a/src/config/commandOptions.js b/src/config/commandOptions.js index d2f2eaaf4..9716668b6 100644 --- a/src/config/commandOptions.js +++ b/src/config/commandOptions.js @@ -54,10 +54,6 @@ export default { type: 'boolean', usage: 'Enforce secure cookies', }, - hideStackTraces: { - type: 'boolean', - usage: 'Hide the stack trace on lambda failure. Default: false', - }, host: { shortcut: 'o', type: 'string', diff --git a/src/config/defaultOptions.js b/src/config/defaultOptions.js index cf9ad25be..7bffe73b4 100644 --- a/src/config/defaultOptions.js +++ b/src/config/defaultOptions.js @@ -13,7 +13,6 @@ export default { dockerNetwork: null, dockerReadOnly: true, enforceSecureCookies: false, - hideStackTraces: false, host: 'localhost', httpPort: 3000, httpsProtocol: null, diff --git a/src/events/http/HttpServer.js b/src/events/http/HttpServer.js index 5669a80b3..fed7c41df 100644 --- a/src/events/http/HttpServer.js +++ b/src/events/http/HttpServer.js @@ -601,10 +601,6 @@ export default class HttpServer { log.error(errorMessage) - if (!this.#options.hideStackTraces) { - log.error(err.stack) - } - for (const [key, value] of entries(endpoint.responses)) { if ( key !== 'default' &&