Skip to content

Commit

Permalink
feat: improve uncaught exception logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyslbw committed Feb 1, 2023
1 parent f8fdcd1 commit 800a587
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/api-cardano-db-hasura/src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ function filterAndTypecastEnvs (env: any) {
await worker.start()
await chainFollower.start(await getChainSyncPoints())
} catch (error) {
logger.error(error.message)
process.exit(1)
}
}
Expand All @@ -179,7 +180,7 @@ function filterAndTypecastEnvs (env: any) {
process.exit(1)
})
} catch (error) {
logger.error(error)
logger.error('Exiting due to uncaught exception', error.message)
process.exit(1)
}
})()
2 changes: 1 addition & 1 deletion packages/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export * from './config'
process.exit(1)
})
} catch (error) {
logger.error(error)
logger.error('Exiting due to uncaught exception', error.message)
process.exit(1)
}
})()

0 comments on commit 800a587

Please sign in to comment.