(req: Request)
| 567 | |
| 568 | // Wrap handler with error handling |
| 569 | async 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) |
| 578 | const observedHandler = wrapWithObserve(safeHandler) |
nothing calls this directly
no test coverage detected