Skip to content

Commit

Permalink
fix: unhandledRejection types are looser than assumed (#18286)
Browse files Browse the repository at this point in the history
* fix: unhandledRejection types are looser than assumed

* simpler than that

* delegate logging the things to the log framework - which should at least be safe
  • Loading branch information
pauldambra authored Oct 31, 2023
1 parent 8c173e6 commit ad0e61d
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, promise })

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

0 comments on commit ad0e61d

Please sign in to comment.