0
(node:25) UnhandledPromiseRejectionWarning: FetchError: request to 

    https://*******************?grant_type=client_credentials&client_id=****************&client_secret=******************&scope=api

 failed, reason: certificate has expired
    at ClientRequest.<anonymous> (/usr/ewa/app/node_modules/node-fetch/lib/index.js:1501:11)
    at ClientRequest.emit (events.js:400:28)
    at ClientRequest.emit (domain.js:475:12)
    at LegacyContextManager.runInContext (/usr/ewa/app/node_modules/newrelic/lib/context-manager/legacy-context-manager.js:59:23)
    at ClientRequest.wrapped (/usr/ewa/app/node_modules/newrelic/lib/transaction/tracer/index.js:203:37)
    at ClientRequest.wrappedRequestEmit (/usr/ewa/app/node_modules/newrelic/lib/instrumentation/core/http-outbound.js:258:24)
    at TLSSocket.socketErrorListener (_http_client.js:475:9)
    at TLSSocket.emit (events.js:400:28)
    at TLSSocket.emit (domain.js:475:12)
    at runInContextCb (/usr/ewa/app/node_modules/newrelic/lib/shim/shim.js:1322:22)
(node:25) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 21)

I am getting the certificate expired error when the code is being deployed on AWS. My docker Image has a node version 14. No such error occurs when I run my code on my local machine.

jabaa
  • 5,844
  • 3
  • 9
  • 30

0 Answers0