MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / safeHandler

Function safeHandler

frontend/app/api/chat/route.ts:569–575  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

567
568// Wrap handler with error handling
569async function safeHandler(req: Request): Promise<Response> {
570 try {
571 return await handleChatRequest(req)
572 } catch (error) {
573 return handleError(error)
574 }
575}
576
577// Wrap with Langfuse observe (if configured)
578const observedHandler = wrapWithObserve(safeHandler)

Callers

nothing calls this directly

Calls 2

handleChatRequestFunction · 0.85
handleErrorFunction · 0.85

Tested by

no test coverage detected