Skip to content

Uncaught exception causes Express to set to undefined basic request parameters #5843

Closed Answered by wesleytodd
NicoAdrian asked this question in Q&A
Discussion options

You must be logged in to vote

Why is it cleared by express ?

It is set and cleared by express. The pattern you are using cannot work because requests can cascade into other matched routes, which would override the params. There are some related open issues about storing matched routes in the req, but none of those have landed AFAIK. If you want this you need to save off a copy in your app code.

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@wesleytodd
Comment options

Answer selected by ctcpip
@wesleytodd
Comment options

@IamLizu
Comment options

@wesleytodd
Comment options

@NicoAdrian
Comment options

This comment was marked as off-topic.

@NicoAdrian
Comment options

@IamLizu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
4 participants
Converted from issue

This discussion was converted from issue #5842 on August 21, 2024 13:08.