Skip to content

Replace stale aVenture error catalog shown for Java Chat browser 404s #70

Description

@WilliamAGH

Summary

File-like or otherwise broken browser paths such as /assets/missing.js return the correct 404 status, but the standalone HTML response renders an aVenture-branded API error-reference page. Replace that stale cross-product response with a Java Chat-owned browser 404 page while preserving the existing API JSON contract and request attribution behavior.

Context

This was found while investigating aventurevc/back-end#1118. The current response follows this ownership chain:

  1. WebMvcConfig excludes dotted paths from the SPA fallback.
  2. CustomErrorController forwards non-/api HTML errors to /errors/not-found.
  3. ErrorDocumentationController serves src/main/resources/static/errors/not-found.html.

That static page still references api.aventure.vc, /v1/entities, Swagger UI, and RFC 9457. Those claims and links do not describe Java Chat, whose canonical URL is javachat.ai and which does not include springdoc.

This issue is separate from #66 and aventurevc/back-end#1118. The 404 status, severity classification, and request ID behavior are correct, and #66 intentionally preserved the existing response behavior while improving attribution.

Current Behavior

  1. Request a missing file-like browser path such as /assets/missing.js with an HTML response expected.
  2. The server returns 404.
  3. The response body is a standalone aVenture API error-reference page rather than a Java Chat browser error page.

Desired Outcome

Java Chat owns the standalone HTML response shown for browser 404s. The response accurately represents Java Chat without changing API error JSON, X-Request-ID, or logging behavior.

Tasks

  • Replace the browser 404 HTML response with a Java Chat-owned and Java Chat-branded page.
  • Add an MVC test that requests a real missing asset path and verifies the rendered response contract.
  • Decide independently whether direct /errors/* catalog routes should remain available or be removed.
  • Confirm the API JSON error contract, X-Request-ID, and existing log behavior remain unchanged.

Acceptance Criteria

  • A real missing-asset MVC request returns 404 and HTML containing Java Chat branding.
  • The same test confirms the response does not reference aVenture, api.aventure.vc, /v1/entities, Swagger UI, or RFC 9457.
  • The disposition of direct /errors/* catalog access is decided separately from the browser 404 response.
  • API JSON error responses are unchanged.
  • X-Request-ID propagation and the logging behavior covered by Make inbound 404 logs attributable without changing response behavior #66 are preserved.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions