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
We are using fetch passing a URL object as resource parameter - and a second options argument containing headers. The first parameter may be any object with a stringifier.1
However, currently it implies here2 that any object passed as first argument to fetch must be a Request.
TypeError: Cannot read properties of undefined (reading 'has')\n at o9.fetch (/node_modules/.pnpm/[email protected][email protected]/node_modules/aws-xray-sdk-fetch/lib/fetch_p.js:71:25)\n at o9.getData (/libs/instruments/service-cityfalcon/src/lib/cityfalcon.service.ts:179:12)\n at params (/libs/instruments/service-cityfalcon/src/lib/cityfalcon.service.ts:60:14)\n at Array.map (<anonymous>)\n at o9.getMarketNewsTimeline (/libs/instruments/service-cityfalcon/src/lib/cityfalcon.service.ts:59:18)\n at mWe (/libs/instruments/cloud/src/lib/market-news/market-news.get-market-news.fn/index.ts:103:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at gfe (/node_modules/.pnpm/@[email protected]/node_modules/@middy/core/index.js:120:32)
Im having the same issue here, was using a URL object as first parameter for fetch, and encounter the same error. Not every time the first parameter is a object, it will be a Request. For now i updated my code to send the URL.href string as resource, but should be fixed
We are using
fetch
passing a URL object asresource
parameter - and a secondoptions
argument containing headers. The first parameter may be any object with a stringifier.1However, currently it implies here2 that any
object
passed as first argument tofetch
must be aRequest
.Footnotes
https://developer.mozilla.org/en-US/docs/Web/API/fetch ↩
https://github.com/aws/aws-xray-sdk-node/blob/58dd586b2e1de562dce07c74e0d066d2b74ad210/sdk_contrib/fetch/lib/fetch_p.js#L63C11-L65 ↩
The text was updated successfully, but these errors were encountered: