From dc958ff6bf9d4a69e5bb7b41a14cef0ec18ff00d Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Mon, 16 Mar 2020 14:32:46 +1300 Subject: [PATCH] refactor(AWS HTTP API): Ensure function name in a warning message --- lib/plugins/aws/package/compile/events/httpApi/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/aws/package/compile/events/httpApi/index.js b/lib/plugins/aws/package/compile/events/httpApi/index.js index d4fcb23e0..7ff81bd57 100644 --- a/lib/plugins/aws/package/compile/events/httpApi/index.js +++ b/lib/plugins/aws/package/compile/events/httpApi/index.js @@ -397,7 +397,7 @@ Object.defineProperties( if (functionTimeout >= routeTargetData.timeout) { logWarning( `HTTP API endpoint timeout setting (${routeTargetData.timeout}s) is ` + - `lower or equal to function timeout (${functionTimeout}s). ` + + `lower or equal to function (${functionName}) timeout (${functionTimeout}s). ` + 'This may introduce situations where endpoint times out ' + 'for succesful lambda invocation.' ); @@ -405,7 +405,7 @@ Object.defineProperties( } else { if (functionTimeout >= 29) { logWarning( - `Function timeout setting (${functionTimeout}) is greater than ` + + `Function (${functionName}) timeout setting (${functionTimeout}) is greater than ` + 'maximum allowed timeout for HTTP API endpoint (29s). ' + 'This may introduce situation where endpoint times out ' + 'for succesful lambda invocation.'