The requestId was being set to a string like "live-avatars-1767520170167" which is not a valid UUID. This caused PostgreSQL to reject the insert into the generations table. Now uses req.requestId from the middleware which generates a proper UUID.