This isn’t a question or call for help, I’m sharing this here in case anyone comes here searching for an answer about this particular issue: We had a support ticket last week from someone whose Slack bot wasn’t working and causing this error:
UnhandledPromiseRejectionWarning: Error: certificate has expired
According to the folks at Slack, they had made a change on their end that would cause this for projects running old versions of Node. The way to upgrade/fix your Slack API projects if you have this issue is:
- Upgrade to Node 10+ (see our Help Center doc on how to do that)
- Use the environment variable
NODE_OPTIONS=--use-openssl-ca
Shouts out to @Elliot_M for initially supporting this user and passing this update along!