Skip to content

Commit

Permalink
fix: unhandledRejection types are looser than assumed
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Oct 30, 2023
1 parent 3962724 commit 8187445
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin-server/src/main/pluginsServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ export async function startPluginsServer(
27, // REBALANCE_IN_PROGRESS
])

process.on('unhandledRejection', (error: Error) => {
status.error('🤮', `Unhandled Promise Rejection: ${error.stack}`)
process.on('unhandledRejection', (error: Error | any, promise: Promise<any>) => {
status.error('🤮', `Unhandled Promise Rejection: ${error?.stack || error} for promise: ${promise}`)

if (error instanceof KafkaJSProtocolError) {
kafkaProtocolErrors.inc({
Expand Down

0 comments on commit 8187445

Please sign in to comment.