GamendWeb.Api.V1.NotFoundController (gamend_web v1.0.1216)

Copy Markdown View Source

Terminates unmatched /api/v1/* requests with a JSON 404.

Without this, an unknown API path falls through to the configured-page catch-all, which pipes through :browser and calls fetch_session — but the endpoint deliberately skips Plug.Session for /api/v1/*, so the request raises instead of 404ing. Scanners probe those paths constantly, so the difference is a stream of 500s in the logs.

Mounted by gamend_configured_page_fallback_routes/0, ahead of the page catch-all and after every real API route.

Summary

Functions

not_found(conn, params)