aws / aws/aws-lambda-nodejs-runtime-interface-client

nodejs runtime missing `cause` when unhandled error thrown

未關閉
#178 0 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
224
分支
60
PR 合併指標
30 天內沒有已合併 PR

描述

For additional context see https://github.com/middyjs/middy/issues/994

**index.js**
```
export const handler = () => {}
throw new Error('error', {cause:'cause'})
```

logs
```
2023-01-26T07:46:54.151Z undefined ERROR Uncaught Exception {
"errorType": "Error",
"errorMessage": "cold",
"stack": [
"Error: cold",
" at file:///var/task/index.mjs:86241:7",
" at ModuleJob.run (node:internal/modules/esm/module_job:193:25)",
" at async Promise.all (index 0)",
" at async ESMLoader.import (node:internal/modules/esm/loader:530:24)",
" at async _tryAwaitImport (file:///var/runtime/index.mjs:921:16)",
" at async _tryRequire (file:///var/runtime/index.mjs:970:86)",
" at async _loadUserApp (file:///var/runtime/index.mjs:994:16)",
" at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1035:21)",
" at async start (file:///var/runtime/index.mjs:1200:23)",
" at async file:///var/runtime/index.mjs:1206:1"
]
}
```

Expect object to include`"errorCause": "cause"`.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。