Issues with API from Netlify

I’m having no issues with my Dapp running localhost with API calls to Infura. But when I push my site to Netlify the site can no longer access Infura. I get “Error: Invalid JSON RPC response” when looking at the function logs.

I’m still running the dev account, do I need to upgrade to account?

Ignore this, I had an env variable being overwritten.

Hi @JeffWScott, and welcome to the Infura community! Glad you figured out what was going on, and thanks for posting it so that others who may run into this same issue can reference it :slight_smile:

Actually I take it back.

So it does seem I’m having issues.

My app will work fine for a while then it will just start bouncing requests. Here is the error.

7:01:19 PM: 2021-02-09T00:01:19.914Z 313d4763-a90d-4bec-b500-3ee48234a647 INFO Error: Invalid JSON RPC response: “”
at Object.InvalidResponse (/var/task/src/node_modules/web3-core-helpers/lib/errors.js:43:16)
at XMLHttpRequest.request.onreadystatechange (/var/task/src/node_modules/web3-providers-http/lib/index.js:95:32)
at XMLHttpRequestEventTarget.dispatchEvent (/var/task/src/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
at XMLHttpRequest._setReadyState (/var/task/src/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
at XMLHttpRequest._onHttpRequestError (/var/task/src/node_modules/xhr2-cookies/dist/xml-http-request.js:349:14)
at ClientRequest. (/var/task/src/node_modules/xhr2-cookies/dist/xml-http-request.js:252:61)
at ClientRequest.emit (events.js:314:20)
at TLSSocket.socketErrorListener (_http_client.js:427:9)
at TLSSocket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

Can you help to shared the code snippet with us that caused these error message?