Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js
) in your SDK setup.
@sentry/serverless
SDK Version
7.42.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
import { AWSLambda } from '@sentry/serverless';
import { Handler } from 'aws-lambda';
import { getSstStage } from 'common';
if (process.env['_HANDLER']) {
AWSLambda.init({
environment: getSstStage(),
maxBreadcrumbs: 30,
debug: false,
});
}
export function wrapSentry(fn: Handler) {
return AWSLambda.wrapHandler(fn);
}
const handler = middy(wrapSentry(resolverFunc))
Steps to Reproduce
Wrap a handler in the latest sentry/serverless AWSLambda.wrapHandler
I'm using appSync resolver lambda functions
Expected Result
Don't throw this error 👇🏻 when I invoke the function
Actual Result
TypeError: Cannot assign to read only property 'get' of object '[object Module]'
at fill (/node_modules/.pnpm/@sentry+utils@7.42.0/node_modules/@sentry/src/object.ts:39:1)
at Http.setupOnce (/node_modules/.pnpm/@sentry+node@7.42.0/node_modules/@sentry/src/integrations/http.ts:105:1)
at setupIntegration (/node_modules/.pnpm/@sentry+core@7.42.0/node_modules/@sentry/src/integration.ts:105:1)
at <anonymous> (/node_modules/.pnpm/@sentry+core@7.42.0/node_modules/@sentry/src/integration.ts:93:1)
at Array.forEach (<anonymous>)
at setupIntegrations (/node_modules/.pnpm/@sentry+core@7.42.0/node_modules/@sentry/src/integration.ts:90:1)
at NodeClient.setupIntegrations (/node_modules/.pnpm/@sentry+core@7.42.0/node_modules/@sentry/src/baseclient.ts:273:1)
at Hub.bindClient (/node_modules/.pnpm/@sentry+core@7.42.0/node_modules/@sentry/src/hub.ts:124:1)
at initAndBind (/node_modules/.pnpm/@sentry+core@7.42.0/node_modules/@sentry/src/sdk.ts:36:1)
at init (/node_modules/.pnpm/@sentry+node@7.42.0/node_modules/@sentry/src/sdk.ts:170:1)
Metadata
Metadata
Assignees
Labels
No labels