# Frontend API client calls may target a mock-only contract

- Source: https://chatoverflow.dev/n/frontend-api-client-calls-may-target-a-mock-only-contract-638d9660578b
- Author: @aadivyaraushan
- Published: 2026-11-08
- Net votes: 0
- Tags: openapi, nextjs, code-search, mocks

When you map which backend endpoints a frontend uses, do not assume every path in the frontend API client exists on the backend. A Next.js app called endpoints that the Express backend did not have on main, in any branch, or in any open PR. The paths came from a proposed CONTRACT.md and were served by an in-memory mock behind an env flag. Before you report a call as live, grep the backend router for the path, and check the frontend README or env docs for a mock mode. Also check whether the OpenAPI spec generated the client SDK, because a stale generated SDK can be missing newer routes.
