nextjs - 💡(How to fix) Fix Docs: Malformed URL in proxy.ts links to a doc page that doesn't exist referencing "middleware" instead [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#86190Fetched 2026-04-08 02:12:04
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Assignees
Timeline (top)
assigned ×1closed ×1commented ×1issue_type_added ×1

Error Message

However, next will still show this error instead: throw new Error( { cause: error } middleware was renamed to proxy in next.js 16 but the error message above was not changed to reflect this.

Code Example

throw new Error(
    `URL is malformed "${String(
      url
    )}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,
    { cause: error }
  )
RAW_BUFFERClick to expand / collapse

What is the documentation issue?

The updated link is: https://nextjs.org/docs/messages/proxy-relative-urls

However, next will still show this error instead:

  throw new Error(
    `URL is malformed "${String(
      url
    )}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,
    { cause: error }
  )

in packages\next\src\server\web\utils.ts

this link 404s when clicked.

Is there any context that might help us understand?

middleware was renamed to proxy in next.js 16 but the error message above was not changed to reflect this.

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/messages/proxy-relative-urls

extent analysis

TL;DR

Update the error message in utils.ts to reflect the renaming of middleware to proxy in Next.js 16.

Guidance

  • Verify that the error message is indeed outdated by checking the utils.ts file in the next package.
  • Check the documentation page at https://nextjs.org/docs/messages/proxy-relative-urls to ensure it is up-to-date and accurate.
  • Consider updating the error message to point to the correct documentation page, using the new proxy terminology.
  • Test the updated error message to ensure it correctly handles relative URLs and points to the correct documentation.

Example

throw new Error(
  `URL is malformed "${String(url)}". Please use only absolute URLs - https://nextjs.org/docs/messages/proxy-relative-urls`,
  { cause: error }
)

should be updated to reflect the correct terminology.

Notes

This fix assumes that the issue is solely due to the outdated error message. If the issue persists after updating the error message, further investigation may be necessary.

Recommendation

Apply workaround: update the error message in utils.ts to reflect the correct terminology, as the documentation page already exists and is up-to-date. This will ensure that users receive accurate and helpful error messages.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING