Hello, just trying to get started, looking at switching from MongoDB Atlas, and I can’t get any requests to work whatsoever, constantly getting this error:
(node:24632) UnhandledPromiseRejectionWarning: Error [ERR_HTTP2_GOAWAY_SESSION]: New streams cannot be created after receiving a GOAWAY
I’m just trying to perform a simple query as follows:
const app = require('express')();
var faunadb = require('faunadb'),
q = faunadb.query;
var client = new faunadb.Client({
secret: 'REDACTED',
});
app.listen(6969, () => console.log('API up on http://localhost:6969'));
app.get('/users/', async (req, res) => {
const doc = await client.query(
q.Get(q.Match(q.Index('users_by_id'), req.query.id))
);
});
Obviously, I have my actual key in the code I’m running.
If I run this query from shell or cli, all is good, but no matter how I formulate things in node, I just keep getting this error. I’ve also directly copied and pasted the examples from the tutorials, and received the exact same error.
I was running node 15, so I tried rolling back to 14 LTS, but no dice.
Am I just missing something obvious here?