Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Feb 27, 2025
1 parent 24acfca commit 1013572
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/next/src/server/app-render/app-render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ import type { MetadataErrorType } from '../../lib/metadata/resolve-metadata'
import isError from '../../lib/is-error'
import { isUseCacheTimeoutError } from '../use-cache/use-cache-errors'
import { createServerInsertedMetadata } from './metadata-insertion/create-server-inserted-metadata'
import { isPostpone } from '../lib/router-utils/is-postpone'

export type GetDynamicParamFromSegment = (
// [slug] / [[slug]] / [...slug]
Expand Down Expand Up @@ -4231,10 +4230,9 @@ async function collectSegmentData(
)
}

process.on('unhandledRejection', (err) => {
console.error('DEBUG:unhandledRejection', err)

if (isPostpone(err)) {
return
}
process.on('unhandledRejection', (reason, promise) => {
console.error('DEBUG:Unhandled Rejection at:', promise)
console.error('DEBUG:Reason:', reason)
// @ts-expect-error
console.error('DEBUG:Stack Trace:', reason?.stack || reason)
})

0 comments on commit 1013572

Please sign in to comment.