alerthub icon indicating copy to clipboard operation
alerthub copied to clipboard

Docker container crashes if Github is not available

Open reconman opened this issue 2 years ago • 0 comments

Github was not available for a short time and the Alerthub Docker container repeatedly crashed with this exception:

Node.js v18.0.0
Application booted at Thu, 05 May 2022 08:22:55 GMT
node:events:505
      throw er; // Unhandled 'error' event
      ^

fetch_url_error: Cannot connect to https://www.github.com/gematik/api-ePA/commits/master.atom
    at Request.<anonymous> (/usr/src/app/node_modules/rss-feed-emitter/src/Feed.js:192:26)
    at Request.emit (node:events:539:35)
    at Request.onRequestError (/usr/src/app/node_modules/request/request.js:877:8)
    at ClientRequest.emit (node:events:527:28)
    at TLSSocket.socketErrorListener (node:_http_client:454:9)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on FeedEmitter instance at:
    at FeedManager.onError (/usr/src/app/node_modules/rss-feed-emitter/src/FeedManager.js:99:19)
    at Feed.handleError (/usr/src/app/node_modules/rss-feed-emitter/src/Feed.js:205:20)
    at Request.<anonymous> (/usr/src/app/node_modules/rss-feed-emitter/src/Feed.js:192:14)
    at Request.emit (node:events:539:35)
    [... lines matching original stack trace ...]
    at emitErrorCloseNT (node:internal/streams/destroy:116:3) {
  feed: 'https://www.github.com/gematik/api-ePA/commits/master.atom'
}

Instead, the application should log the error and continue running.

reconman avatar May 05 '22 17:05 reconman