|
|
|
@ -144,7 +144,7 @@ JsInvokeMessageProcessor.prototype.processInvokeRequest = function (requestId, r |
|
|
|
}, |
|
|
|
(err) => { |
|
|
|
var errorCode; |
|
|
|
if (err.message.includes('Script execution timed out')) { |
|
|
|
if (err && isString(err.message) && err.message.includes('Script execution timed out')) { |
|
|
|
errorCode = TIMEOUT_ERROR; |
|
|
|
} else { |
|
|
|
errorCode = RUNTIME_ERROR; |
|
|
|
@ -321,4 +321,8 @@ function deleteMinUsedScript() { |
|
|
|
this.scriptMap.delete(prevScriptId); |
|
|
|
} |
|
|
|
|
|
|
|
function isString(value) { |
|
|
|
return typeof value === 'string'; |
|
|
|
} |
|
|
|
|
|
|
|
module.exports = JsInvokeMessageProcessor; |
|
|
|
|