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

Adds note about custom server requirements #39931

Merged
merged 2 commits into from Aug 25, 2022
Merged

Conversation

esbenam
Copy link
Contributor

@esbenam esbenam commented Aug 25, 2022

This wasn't obvious to me when trying out middleware in our project, and the error message was Invalid URL - took me embarrassingly long to remember that we run a custom server. Would it be possibly to detect that middleware is used and then throw a descriptive error message when trying to call next without hostname and port in a custom server? If someone can point me to where that could be done, I would be happy to make a pull request.

Documentation / Examples

  • Make sure the linting passes by running pnpm lint

I made the change in Github ui, so couldn't run pnpm lint. Is this automated or should I clone and run it locally?

This wasn't obvious to me when trying out middleware in our project, and the error message was `Invalid URL` - took me embarrassingly long to remember that we run a custom server. Would it be possibly to detect that middleware is used and then throw a descriptive error message when trying to call `next` without `hostname` and `port` in a custom server? If someone can point me to where that could be done, I would be happy to make a pull request.
Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

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

Thanks!

@kodiakhq kodiakhq bot merged commit a9772b1 into vercel:canary Aug 25, 2022
leerob added a commit that referenced this pull request Aug 26, 2022
kodiakhq bot pushed a commit that referenced this pull request Aug 26, 2022
Reverts #39931

Let's instead add this to the custom server documentation, in a section on "Using Middleware". Since such a low percentage of folks eject out of the default server, this shouldn't be so high up on the Middleware docs page.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants