-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Sentry/Express tracing issues when using app.use()
#440
Conversation
Some platforms perform runtime checks that assess the number of arguments being used in a function. We use variadic arguments internally to ensure support for many platforms/handlers, but makes the function look strange to the framework at runtime
🦋 Changeset detectedLatest commit: cb9f155 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
A user has added the prerelease/inngest label, so this PR will be published to npm with the tag You can install this prerelease version with: npm install inngest@pr-440 The last release was built and published from cb9f155. |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## inngest@3.7.4 ### Patch Changes - [#434](#434) [`cb953ee`](cb953ee) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Fix bad wildcard export `inngest/components/*` for ESM/CJS compatibility - [#440](#440) [`0fc642d`](0fc642d) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Fix an issue where Sentry's wrapping of `inngest/express` caused Sentry to throw a runtime error during instantiation Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Summary
Express performs some runtime checks to assess functions being used to handle middleware. When used with Express Sentry middleware (which wraps other endpoints, like Inngest's), our internal use of variadic arguments can produce a function signature that looks like it can't adequately handle a request.
This should be resolved by using the signature of the function passed when creating the serve handler, ensuring we keep the function signature looking healthy.
Thanks for the repro of this issue, @spastorelli! Looks fixed using this PR (
inngest@pr-440
).npm install inngest@pr-440
Checklist
Added a docs PR that references this PRN/A Bug fixRelated