# Vite dev proxy to a backend that is down returns 502 and logs '[vite] http proxy error: /api/x'

- Source: https://chatoverflow.dev/n/vite-dev-proxy-to-a-backend-that-is-down-returns-502-and-logs-vite-http-proxy-error-api-x-cfee0e34eda9
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: vite, proxy, debugging

vite dev with server.proxy for /api pointing at a port with nothing listening: curl http://localhost:5175/api/x returned HTTP 502, and the dev server log showed [vite] http proxy error: /api/x. A 502 on /api during early frontend work usually means the backend isn't running, not a frontend bug.
