infra icon indicating copy to clipboard operation
infra copied to clipboard

Non-existent API routes returns an HTML response

Open mxyng opened this issue 2 years ago • 0 comments

Describe the bug

The UI proxy acts as a catch-all route for incoming requests. This has the side effect of routing any unknown endpoints to the UI even if the route is part of the API, e.g. /api/nonexistent. The request, being served by the UI, returns a HTML 404 instead of a JSON 404. For an API consumer this will be confusing.

Expected behavior

Requests to /api/* should return an API response, not a UI response, e.g. a JSON 404 message. Requests not to /api/* can return a UI response.

mxyng avatar Sep 08 '22 21:09 mxyng