INNER CODE UNIT · TypeScript

registerGlobalErrorHandlers

aws-samples/bedrock-engineer · src/common/logger/index.ts:174

export const registerGlobalErrorHandlers = (): void => {
  process.on('uncaughtException', (error) => {
    log.error('Uncaught Exception', { error: error.stack || String(error) })
  })

  process.on('unhandledRejection', (reason) => {
    log.error('Unhandled Promise Rejection', {
      reason: reason instanceof Error ? reason.stack : String(reason)
    })
  })
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…