Skip to content

add deprecation warnings for redirect arguments undefined - #6405

Merged
bjohansebas merged 1 commit into
expressjs:masterfrom
bjohansebas:deprecate-res.redirect(undefined)
Jul 15, 2025
Merged

add deprecation warnings for redirect arguments undefined#6405
bjohansebas merged 1 commit into
expressjs:masterfrom
bjohansebas:deprecate-res.redirect(undefined)

Conversation

@bjohansebas

@bjohansebasbjohansebas commented Mar 19, 2025

Copy link
Copy Markdown
Member

🛑 No Merge before #6404 has landed in v6


With this, those arguments are deprecated when they are undefined or different from their data type

Related #6404
Closes#6391

@UlisesGascon

Copy link
Copy Markdown
Member

I added a warning message in the description to prevent early merges 👍

@bjohansebas

Copy link
Copy Markdown
MemberAuthor

I think it should be the other way around—this should be merged first before #6404, since it needs to be deprecated in v5 first for the effect to result in throwing errors in v6. Does that make sense?

@bjohansebas

Copy link
Copy Markdown
MemberAuthor

@wesleytodd@UlisesGascon @expressjs/express-collaborators Any objections to releasing this in the next minor version of Express?

@bjohansebasbjohansebas mentioned this pull request May 29, 2025
@bjohansebas
bjohansebas merged commit c5b8d55 into expressjs:masterJul 15, 2025
@bjohansebas
bjohansebas deleted the deprecate-res.redirect(undefined) branch July 15, 2025 03:18
@UlisesGasconUlisesGascon mentioned this pull request Nov 25, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throw when the path is undefined in res.redirect.

2 participants

@bjohansebas@UlisesGascon