From 80a143c9f060addbda3b4ccb42a1276f2d2506e7 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Sat, 16 Nov 2024 00:10:18 +0100 Subject: [PATCH] replace not-found by util --- packages/next/src/server/app-render/app-render.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/src/server/app-render/app-render.tsx b/packages/next/src/server/app-render/app-render.tsx index bd7180c2029f8..afcdd59e2ed59 100644 --- a/packages/next/src/server/app-render/app-render.tsx +++ b/packages/next/src/server/app-render/app-render.tsx @@ -1844,11 +1844,11 @@ async function renderToStream( throw err } - let errorType: 'not-found' | 'redirect' | undefined + let errorType: MetadataErrorType | 'redirect' | undefined if (isHTTPAccessFallbackError(err)) { res.statusCode = getAccessFallbackHTTPStatus(err) - errorType = 'not-found' + errorType = getAccessFallbackErrorTypeByStatus(res.statusCode) } else if (isRedirectError(err)) { errorType = 'redirect' res.statusCode = getRedirectStatusCodeFromError(err)