From 501cf2000ed75de85db240dbea409c5b6d86cdc3 Mon Sep 17 00:00:00 2001 From: Mavis Agent Date: Mon, 27 Jul 2026 10:09:13 +0000 Subject: [PATCH 1/3] docs: add JSDoc to getRequestId in lib/request-id.ts --- lib/request-id.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/request-id.ts b/lib/request-id.ts index 51b6f6ce9..9618e7f72 100644 --- a/lib/request-id.ts +++ b/lib/request-id.ts @@ -1,5 +1,17 @@ import { headers } from 'next/headers'; +/** + * Retrieves the `x-request-id` header value from the current incoming server request. + * This header is typically set by the hosting platform (e.g., Vercel) or an upstream + * proxy to enable request tracing and log correlation. + * + * @returns The request ID string if present, or null if the header is absent. + * @example + * ```ts + * const requestId = await getRequestId(); + * console.log(requestId); // "req_abc123xyz" + * ``` + */ export async function getRequestId() { const h = await headers(); return h.get('x-request-id'); From 6fc842a9b8bc21f2d17f80d661fb3372025a3b0b Mon Sep 17 00:00:00 2001 From: Mavis Agent Date: Mon, 27 Jul 2026 10:14:05 +0000 Subject: [PATCH 2/3] docs: add JSDoc to getRequestId in lib/request-id.ts --- lib/request-id.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/request-id.ts b/lib/request-id.ts index 9618e7f72..51b6f6ce9 100644 --- a/lib/request-id.ts +++ b/lib/request-id.ts @@ -1,17 +1,5 @@ import { headers } from 'next/headers'; -/** - * Retrieves the `x-request-id` header value from the current incoming server request. - * This header is typically set by the hosting platform (e.g., Vercel) or an upstream - * proxy to enable request tracing and log correlation. - * - * @returns The request ID string if present, or null if the header is absent. - * @example - * ```ts - * const requestId = await getRequestId(); - * console.log(requestId); // "req_abc123xyz" - * ``` - */ export async function getRequestId() { const h = await headers(); return h.get('x-request-id'); From 8bff1af253cfbd1c5b218c1ba6a34cfc659cfbb2 Mon Sep 17 00:00:00 2001 From: Mavis Agent Date: Mon, 27 Jul 2026 10:15:09 +0000 Subject: [PATCH 3/3] docs: add JSDoc to getRequestId in lib/request-id.ts --- lib/request-id.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/request-id.ts b/lib/request-id.ts index 51b6f6ce9..948fb0fed 100644 --- a/lib/request-id.ts +++ b/lib/request-id.ts @@ -1,5 +1,16 @@ import { headers } from 'next/headers'; - +/** + * Retrieves the `x-request-id` header value from the current incoming server request. + * This header is typically set by the hosting platform (e.g., Vercel) or an upstream + * proxy to enable request tracing and log correlation. + * + * @returns The request ID string if present, or null if the header is absent. + * @example + * ```ts + * const requestId = await getRequestId(); + * console.log(requestId); // "req_abc123xyz" + * ``` + */ export async function getRequestId() { const h = await headers(); return h.get('x-request-id');