Package + Version
Version:
Description
Hello, we use Sentry for our Serverless applications which use NestJS and the nest-raven library that implements an interceptor to catch the errors and report them to Sentry.io and everything is bundled using Webpack. After we upgraded from 5.23.0 to the last version 5.26.0 we noticed that when an exception happens we receive an Internal Server Error and the original Exception is not reported to Sentry.io because it is the Sentry library that is having problems. The backend logs we have are:
| 2020-10-13T14:51:20.131-04:00 | TypeError: mod.require is not a function
-- | -- | --
| 2020-10-13T14:51:20.131-04:00 | at dynamicRequire (/var/task/src/adapters/graphql/handler.js:79802:16)
| 2020-10-13T14:51:20.131-04:00 | at /var/task/src/adapters/graphql/handler.js:79860:39
| 2020-10-13T14:51:20.131-04:00 | at Array.forEach (<anonymous>)
| 2020-10-13T14:51:20.131-04:00 | at extractNodeRequestData (/var/task/src/adapters/graphql/handler.js:79845:10)
| 2020-10-13T14:51:20.131-04:00 | at Module.parseRequest (/var/task/src/adapters/graphql/handler.js:131937:61)
| 2020-10-13T14:51:20.131-04:00 | at RavenInterceptor.captureGraphQLException (/var/task/src/adapters/graphql/handler.js:645524:42)
| 2020-10-13T14:51:20.131-04:00 | at Sentry.withScope (/var/task/src/adapters/graphql/handler.js:645514:45)
| 2020-10-13T14:51:20.131-04:00 | at Hub.withScope (/var/task/src/adapters/graphql/handler.js:654823:13)
| 2020-10-13T14:51:20.131-04:00 | at callOnHub (/var/task/src/adapters/graphql/handler.js:13438:28)
| 2020-10-13T14:51:20.131-04:00 | at Module.withScope (/var/task/src/adapters/graphql/handler.js:13572:5)
After analyzing the bundle we noticed that the it happens in the dynamicRequire function specifically when it's called from packages/utils/src/node.ts line 93 which was introduced in version 5.24.0.
Checking the stacktrace it happens when Handlers.parseRequests is called from the Nest-Raven library we use
So far the workaround is to keep using @sentry/node@5.23.0 where the error does not happen.
Package + Version
@sentry/browser@sentry/noderaven-jsraven-node(raven for node)Version:
Description
Hello, we use Sentry for our Serverless applications which use NestJS and the nest-raven library that implements an interceptor to catch the errors and report them to Sentry.io and everything is bundled using Webpack. After we upgraded from
5.23.0to the last version5.26.0we noticed that when an exception happens we receive an Internal Server Error and the original Exception is not reported to Sentry.io because it is the Sentry library that is having problems. The backend logs we have are:After analyzing the bundle we noticed that the it happens in the
dynamicRequirefunction specifically when it's called from packages/utils/src/node.ts line 93 which was introduced in version5.24.0.Checking the stacktrace it happens when
Handlers.parseRequestsis called from the Nest-Raven library we useSo far the workaround is to keep using
@sentry/node@5.23.0where the error does not happen.