Skip to content

Commit 27e2832

Browse files
authoredOct 19, 2022
feat(proxy): Include URL of request in proxy errors (#10508)
1 parent 8d0a9c1 commit 27e2832

File tree

1 file changed

+3
-1
lines changed
  • packages/vite/src/node/server/middlewares

1 file changed

+3
-1
lines changed
 

‎packages/vite/src/node/server/middlewares/proxy.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ export function proxyMiddleware(
5252
const res = originalRes as http.ServerResponse | net.Socket
5353
if ('req' in res) {
5454
config.logger.error(
55-
`${colors.red(`http proxy error:`)}\n${err.stack}`,
55+
`${colors.red(`http proxy error at ${originalRes.req.url}:`)}\n${
56+
err.stack
57+
}`,
5658
{
5759
timestamp: true,
5860
error: err

0 commit comments

Comments
 (0)
Please sign in to comment.