From bfe369f1111cfaee67fb300522b8f252ed26e46e Mon Sep 17 00:00:00 2001 From: Trim21 Date: Sun, 2 Feb 2025 02:18:42 +0800 Subject: [PATCH] fix: server request id header --- packages/website/src/components/ErrorBoundary/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/src/components/ErrorBoundary/index.tsx b/packages/website/src/components/ErrorBoundary/index.tsx index 3f62a6315..8e8ecd414 100644 --- a/packages/website/src/components/ErrorBoundary/index.tsx +++ b/packages/website/src/components/ErrorBoundary/index.tsx @@ -48,7 +48,7 @@ export default class ErrorBoundary extends React.Component< let msg = error.message ?? '发生未知错误'; let reqID: string | null = null; if (error instanceof HttpError) { - reqID = error.headers.get('cf-ray'); + reqID = error.headers.get('x-request-id'); const { message = msg, code = error.status } = (error.data ?? {}) as Partial; msg = message; // 选择对应 statusCode / err code 的 fallback