Skip to content

fix(nextjs): Handle async params in url extraction - #17162

Merged
chargome merged 5 commits into
developfrom
cg-next-fix-async-params-warn
Jul 25, 2025
Merged

chargome merged 5 commits into
developfrom
cg-next-fix-async-params-warn

Conversation

@chargome

@chargome chargome commented Jul 24, 2025 •

Copy link
Copy Markdown
Member

closes https://linear.app/getsentry/issue/JS-535/error-route-used-searchparams-sentry-skip-normalization-searchparams
closes #16542

Unfortunately we can't resolve the params promise within the template as making this async leads to some nasty RSC errors which we want to stay away from.

@chargome chargome self-assigned this Jul 24, 2025
@chargome
chargome marked this pull request as ready for review July 25, 2025 09:50

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we test this somehow?

@chargome

Copy link
Copy Markdown
Member Author

Tests for this are already in place, or do you mean the extract function?

@andreiborza

Copy link
Copy Markdown
Member

Tests for this are already in place, or do you mean the extract function?

no, I mean can we assert on this not causing warnings/errors in the tests? I think (prior to this fix) they were logged out to stdout right?

@chargome

Copy link
Copy Markdown
Member Author

no, I mean can we assert on this not causing warnings/errors in the tests? I think (prior to this fix) they were logged out to stdout right?

ah yeah I can see if there's a way to test that, I only tested it in a sample app

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants