Skip to content
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

feat(nitro-utils): Add patchEventHandler helper for nitro #14614

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

andreiborza
Copy link
Member

@andreiborza andreiborza commented Dec 6, 2024

E2E tests and usage in nuxt in: #14612

@andreiborza andreiborza requested a review from s1gr1d December 6, 2024 13:13
* A helper to patch a given `h3` event handler, ensuring that
* requests are properly isolated and data is flushed to Sentry.
*/
export function patchEventHandler(handler: EventHandler): EventHandler {
Copy link
Member

Choose a reason for hiding this comment

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

L: We could give this a name that speaks more for itself (with the downside that it gets long). E.g. forkScopeAndFlushServerless

Copy link
Member Author

Choose a reason for hiding this comment

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

I opted for a shorter name because where it's imported from gives enough context. But happy to change if you think otherwise, let me know :)

Copy link
Member

Choose a reason for hiding this comment

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

No strong feelings about this :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Will keep it then, can always change later since this isn't really public api.

Co-authored-by: Sigrid Huemer <32902192+s1gr1d@users.noreply.github.com>
@andreiborza andreiborza merged commit 05c7c89 into develop Dec 6, 2024
33 checks passed
@andreiborza andreiborza deleted the ab/patch-nitro-event-handler branch December 6, 2024 13:27
andreiborza added a commit that referenced this pull request Dec 6, 2024
E2E tests and usage in nuxt in:
#14612

---------

Co-authored-by: Sigrid Huemer <32902192+s1gr1d@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants