Cypress error cy.request() failed trying to load: http://localhost:3000/api/... ECONNREFUSED
The API server that cy.request() is calling isn't reachable at that host/port.
Why this happens
- The API server isn't running yet when the test suite starts
- Wrong host/port baked into the request URL (often from a stale env var)
How to fix it
- Add a health-check step in CI that confirms the API is up before running the suite
- Verify the baseUrl/env var used to build the request URL matches where the API actually listens