ignore moar errors

This commit is contained in:
Chipmunk 2024-08-04 17:52:43 -04:00
parent 6332d9baa0
commit 16fe736cd3

View file

@ -56,12 +56,13 @@ async function main () {
}
process.on('uncaughtException', error => {
if (error.stack.includes('protodef')) {
if (error.stack.includes('protodef') || error.code === 'Z_BUF_ERROR') {
console.error('Uncaught protodef exception!\n' + error.stack)
return // Ignore protodef-related errors (packet-related)
}
throw error
console.error(error)
process.exit(1)
})
}