mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-02 13:52:40 +00:00
UBERF-4824 Handle unhandled rejections in collaborator (#4302)
Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
parent
b685aae286
commit
b43231b78e
@ -51,6 +51,14 @@ export async function startCollaborator (): Promise<void> {
|
|||||||
void shutdown()
|
void shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
process.on('uncaughtException', (e) => {
|
||||||
|
console.error(e)
|
||||||
|
})
|
||||||
|
|
||||||
|
process.on('unhandledRejection', (reason, promise) => {
|
||||||
|
console.error('Unhandled Rejection at:', promise, 'reason:', reason)
|
||||||
|
})
|
||||||
|
|
||||||
process.on('SIGINT', close)
|
process.on('SIGINT', close)
|
||||||
process.on('SIGTERM', close)
|
process.on('SIGTERM', close)
|
||||||
process.on('exit', close)
|
process.on('exit', close)
|
||||||
|
Loading…
Reference in New Issue
Block a user