feat(api): expose CRM-shaped GET /api/error-monitoring/recent-errors on Fastify

Register the same handler as /v1/paperclip/recent-errors so NPM and direct
API probes (e.g. :3200) match Paperclip default PAPERCLIP_ERROR_API_QUERY.
Admin UI proxy now calls the Fastify path for a single contract end-to-end.

Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-702
Paperclip-Run: 4ba525c4-3929-475c-a845-400c49eda817
Made-with: Cursor
This commit is contained in:
David Santos committed 2026-04-01 16:28:43 +00:00
1 parent 6811dba303
commit bc8bd8707f
3 files changed
+48 -43

No files matched your search

@@ -21,7 +21,7 @@ export async function GET(request: NextRequest) {
}
const base = rawBase.replace(/\/$/, "");
const src = new URL(request.url);
const target = `${base}/v1/paperclip/recent-errors${src.search}`;
const target = `${base}/api/error-monitoring/recent-errors${src.search}`;
const upstream = await fetch(target, {
method: "GET",