Skip to content

catch unhandle promise rejections#435

Merged
windkh merged 1 commit intowindkh:masterfrom
gtalusan:master
Apr 4, 2026
Merged

catch unhandle promise rejections#435
windkh merged 1 commit intowindkh:masterfrom
gtalusan:master

Conversation

@gtalusan
Copy link
Copy Markdown
Contributor

@gtalusan gtalusan commented Apr 4, 2026

My node-red instance will crash if the network/Internet disappears. This finds some spots with unhandled promise rejections.

4 Apr 00:35:03 - [info] node-red-contrib-telegrambot: WebHook listening on 0.0.0.0:8445
Unhandled rejection RequestError: Error: getaddrinfo EAI_AGAIN api.telegram.org
    at new RequestError (/data/node_modules/request-promise-core/lib/errors.js:14:15)
    at Request.plumbing.callback (/data/node_modules/request-promise-core/lib/plumbing.js:87:29)
    at Request.RP$callback [as _callback] (/data/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/data/node_modules/@cypress/request/request.js:183:22)
    at Request.emit (node:events:524:28)
    at Request.onRequestError (/data/node_modules/@cypress/request/request.js:869:8)
    at ClientRequest.emit (node:events:524:28)
    at emitErrorEvent (node:_http_client:101:11)
    at TLSSocket.socketErrorListener (node:_http_client:504:5)
    at TLSSocket.emit (node:events:524:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Copy link
Copy Markdown
Owner

@windkh windkh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gtalusan thank you for your PR. Well done. I will add you to the credits list

@windkh windkh merged commit cc9d713 into windkh:master Apr 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants