GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • anc.dev the agent-native standard
  • Leaderboards
  • Audit
  • Install
  • Skill
  • About

This view

  • Original page
  • New address

GeezerVison is showing anc.dev — Fix: API client errors return JSON, not HTML

Fix: API client errors return JSON, not HTML

Web-audit fix skill for the json-errors check (API, SHOULD).

Goal

Return a JSON error body on client-error API responses so agents can parse the failure.

Fix

On a client-error API response (4xx), return Content-Type: application/json and a JSON object (for example { "error": { "code": "not_found", "message": "..." } }), not an HTML error page. Agents cannot recover from a soft-HTML 404. The audit probes a documented OpenAPI 4xx GET when one exists, otherwise GET /anc-web-audit-no-such-api.

Resources

  • RFC 9457 (problem+json)

Copy-paste prompt

Paste this into your coding agent. Your audit adds what it observed for this check:

Verify

Re-run the audit at https://anc.dev/audit or call the audit_website MCP tool; the json-errors check should report pass.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.