Bugfix: Frontend route /api-tools returns 404 JSON from NestJS inste...

Documentation for Sessions

🐛 Bugfix: Frontend route /api-tools returns 404 JSON from NestJS inste...

Date: 2026-03-17
Time: 17:16:54 UTC
Session: gspace1-229.5
Agent: backend
Confidence: 100%
Status: ✅ Documented


📋 Decision Context

Question:

Frontend route /api-tools returns 404 JSON from NestJS instead of serving the Angular component

Task: Not specified


🎯 Decision Made

Chosen:

Renamed route from /api-tools to /dev-tools. The /api prefix in the route path was caught by the webpack-dev-server proxy configuration which forwards all /api/* requests to backend-api (port 3000). The backend has no /api-tools route, so it returns 404.

Options Considered:

  1. Add proxy exclusion for /api-tools (fragile, easy to break)
  2. Use /dev-tools path (clean, no conflict)
  3. Use /system/api-tools nested path (would work but /system is not proxied)

💭 Reasoning

The shared proxy config at libs/libs-foundational/api-config/proxy.conf.json has '/api' as a proxy rule. Any frontend route starting with /api will be intercepted by the proxy and forwarded to the backend instead of being handled by Angular's router. This is a systemic constraint — ALL frontend routes must avoid the /api, /ai-api, /docs-api, /vitto-api prefixes. The fix is simple: choose a route name that doesn't collide with proxy prefixes.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation