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

get data from request in Bun.serve Error handler #15475

Open
Kapsonfire-DE opened this issue Nov 28, 2024 · 0 comments · May be fixed by #15479
Open

get data from request in Bun.serve Error handler #15475

Kapsonfire-DE opened this issue Nov 28, 2024 · 0 comments · May be fixed by #15479
Assignees
Labels
enhancement New feature or request

Comments

@Kapsonfire-DE
Copy link
Contributor

What is the problem this feature would solve?

https://discord.com/channels/876711213126520882/1310569549338247178

Sancho Godinho
OP
— 25.11.2024 12:35
I am making a certain site in which I need error handling requiring access to header data. How can I achieve this?

What is the feature you are proposing to solve the problem?

pass the original header to the error handler as second argument

Jarred
careful with the PR, it might be difficult to do consistently because it’s easy to free the request object too early
That was the main reason we didn’t do this. Making sure we don’t cause a either a use after free or a memory leak might be difficult to do in each scenario
But I don’t think we actually tried
so might be imagining it to be harder than it is

I'm gonna considering to pass a less populated object only holding URI and Headers if the original object is too complicated to pass

What alternatives have you considered?

Assign me to this topic please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant