Skip to content

Using sentry causes api routes to return an empty response #775

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

Open
digitaltoad opened this issue Mar 13, 2025 · 3 comments
Open

Using sentry causes api routes to return an empty response #775

digitaltoad opened this issue Mar 13, 2025 · 3 comments

Comments

@digitaltoad
Copy link

When using Sentry with Nextjs under SST, when instrumentation is enabled on API routes, be it through the autoInstrumentServerFunctions or by wrapping the api handler, the response is empty. I'm not sure if this is directly related to opennextjs or if this is an issue with sst itself but in #350 it looks like opennext was causing it previously. I've created a repo to reproduce the problem https://github.com/digitaltoad/sst-opennext-sentry-issue.

@conico974
Copy link
Contributor

@digitaltoad Could you try enabling streaming ? Just create an open-next.config.ts file at the same place as your next config https://opennext.js.org/aws/config/simple_example#streaming-with-lambda

If this doesn't help, i'll try to take a look at it later this week

@digitaltoad
Copy link
Author

@conico974 that seemed to fix the issue.

@conico974
Copy link
Contributor

Ok i'll have to take another look at this, my first guess is that sentry is probably doing something wrong here, i'll have to see if we can do something about it or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants