Skip to content

Commit

Permalink
replace not-found by util
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Nov 15, 2024
1 parent a9e7440 commit 80a143c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next/src/server/app-render/app-render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 80a143c

Please sign in to comment.