You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
response.write(`Function invocation took longer than ${timeout} seconds.`);
20
+
response.end();
21
+
console.log(
22
+
`Your lambda function took longer than ${timeout} seconds to finish.
23
+
If you need a longer execution time, you can increase the timeout using the -t or --timeout flag.
24
+
Please note that default function invocation is 10 seconds, check our documentation for more information (https://www.netlify.com/docs/functions/#custom-deployment-options).
25
+
`
26
+
);
27
+
}
28
+
17
29
functioncreateCallback(response){
18
30
returnfunctioncallback(err,lambdaResponse){
19
31
if(err){
@@ -50,7 +62,7 @@ function promiseCallback(promise, callback) {
50
62
if(typeofpromise.then!=='function')return;
51
63
if(typeofcallback!=='function')return;
52
64
53
-
promise.then(
65
+
returnpromise.then(
54
66
function(data){
55
67
callback(null,data);
56
68
},
@@ -80,7 +92,7 @@ function buildClientContext(headers) {
80
92
}
81
93
}
82
94
83
-
functioncreateHandler(dir,static){
95
+
functioncreateHandler(dir,static,timeout){
84
96
returnfunction(request,response){
85
97
// handle proxies without path re-writes (http-servr)
0 commit comments