spike-2 / Spike-2

Server specific Discord bot
https://spike-2.github.io
1 stars 0 forks source link

Winston Discord Errors are Fatal #76

Closed brandoningli closed 2 years ago

brandoningli commented 2 years ago

Describe the bug

Errors sending to the Winston discord transport are fatal.

To Reproduce

Not easily reproducible.

Expected behavior

An error should be logged indicating the error sending to discord, but should not be fatal. This error should not try to be sent to discord.

Screenshots

Runtime Info

Additional context

[2022-01-06 02:44:31] [error] uncaughtException: request to <WEBHOOK> failed, reason: getaddrinfo EAI_AGAIN discord.com
FetchError: request to <WEBHOOK> failed, reason: getaddrinfo EAI_AGAIN discord.com
    at ClientRequest.<anonymous> (/home/joshua/Workspace/Spike-2/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (node:events:390:28)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)