import type { RequestHandler } from "express"; import crypto from "node:crypto"; export const requestIdMiddleware: RequestHandler = (req, _res, next) => { req.requestId = crypto.randomUUID(); next(); };