Function api call fails due to socket disconnect

My site is jeffersontheatrecompany.org

When a student completes an audition application, the data is sent through Googles apis to a couple of Google sheets. The problem is when the lambda function attempts authorization with the google api. This works just fine in dev, but fails in production.

Error log here:

ERROR	Unhandled Promise Rejection {
  "errorType":"Runtime.UnhandledPromiseRejection",
  "errorMessage":"FetchError: request to https://www.googleapis.com/oauth2/v4/token failed, reason: Client network socket disconnected before secure TLS connection was established",
  "reason":{
    "errorType":"FetchError",
    "errorMessage":"request to https://www.googleapis.com/oauth2/v4/token failed, reason: Client network socket disconnected before secure TLS connection was established",
    "code":"ECONNRESET",
    "message":"request to https://www.googleapis.com/oauth2/v4/token failed, reason: Client network socket disconnected before secure TLS connection was established",
    "type":"system",
    "errno":"ECONNRESET",
    "config":{
      "method":"POST",
      "url":"https://www.googleapis.com/oauth2/v4/token",
      "data":{
        "grant_type":"urn:ietf:params:oauth:grant-type:jwt-bearer",
        "assertion":"..."
        },
      "headers":{
        "Content-Type":"application/x-www-form-urlencoded",
        "Accept":"application/json"
        },
      "responseType":"json",
      "body":"grant_type=..."
      },
    "stack":[
      "FetchError: request to https://www.googleapis.com/oauth2/v4/token failed,reason: Client network socket disconnected before secure TLS connection was established",
      "    at ClientRequest.<anonymous> (/var/task/node_modules/node-fetch/lib/index.js:1491:11)",
      "    at ClientRequest.emit (events.js:400:28)",
      "    at TLSSocket.socketErrorListener (_http_client.js:475:9)",
      "    at TLSSocket.emit (events.js:400:28)",
      "    at emitErrorNT (internal/streams/destroy.js:106:8)",
      "    at emitErrorCloseNT (internal/streams/destroy.js:74:3)",
      "    at processTicksAndRejections (internal/process/task_queues.js:82:21)"
      ]
    },
  "promise":{},
  "stack":[
    "Runtime.UnhandledPromiseRejection: FetchError: request to https://www.googleapis.com/oauth2/v4/token failed, reason: Client network socket disconnected before secure TLS connection was established",
    "    at process.<anonymous> (/var/runtime/index.js:35:15)","    at process.emit (events.js:400:28)",
    "    at processPromiseRejections (internal/process/promises.js:245:33)",
    "    at processTicksAndRejections (internal/process/task_queues.js:96:32)"
    ]
}

Hey @jeffersontheatreco,

Based on this:

It appears to be a higher-level problem with Google APIs and people have had to find ways around it by trying to use VPNs and proxies. Have you checked that discussion to see if it applies to you?