I was running my server locally and my laptop accidentally connected to one of those wifis which redirects all your http(s) requests. This resulted in this error:
error: Error: self signed certificate
at Strategy.OAuthStrategy._createOAuthError (/Users/olalonde/code/myapp/myapp-api/node_modules/passport-oauth1/lib/strategy.js:396:17)
at /Users/olalonde/code/myapp/myapp-api/node_modules/passport-oauth1/lib/strategy.js:244:41
at /Users/olalonde/code/myapp/myapp-api/node_modules/oauth/lib/oauth.js:543:17
at ClientRequest.<anonymous> (/Users/olalonde/code/myapp/myapp-api/node_modules/oauth/lib/oauth.js:421:9)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:306:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1265:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
GET /v1/auth/connect/twitter 500 75.890 ms - 39
events.js:160
throw er; // Unhandled 'error' event
^
Error: self signed certificate
at Error (native)
at TLSSocket.<anonymous> (_tls_wrap.js:1055:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:580:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:412:38)
[nodemon] app crashed - waiting for file changes before starting...
I was wondering if there would be any way to catch this error so that it doesn't crash the whole process next time.
I was running my server locally and my laptop accidentally connected to one of those wifis which redirects all your http(s) requests. This resulted in this error:
I was wondering if there would be any way to catch this error so that it doesn't crash the whole process next time.