Handle a POST /api/analyze request end-to-end.
POST /api/analyze
Pipeline:
{ url }
console.warn
DriveError
GeminiError
{ person, transcript }
Any unexpected exception is logged at console.error and surfaced as a generic 500. Raw upstream messages never reach the client.
console.error
Incoming POST /api/analyze request.
Worker environment (provides GEMINI_API_KEY).
GEMINI_API_KEY
Either the analyzed JSON or a uniform { error } body.
{ error }
Handle a
POST /api/analyzerequest end-to-end.Pipeline:
{ url }shape — return 400 with a static message on failure (Zod issue detail goes toconsole.warn, never the client).DriveErroris mapped to a user-safe response.GeminiErroris mapped to a user-safe response.{ person, transcript }JSON.Any unexpected exception is logged at
console.errorand surfaced as a generic 500. Raw upstream messages never reach the client.