Hi!
I’m complete begginer at node.js and js. Trying to insert data to Postgres but getting errors:
> at Connection.null (/opt/ee/node_modules/pg/lib/client.js:132:36)
at Object.onceWrapper (events.js:519:28)
at Connection.emit (events.js:412:35)
at Socket.null (/opt/ee/node_modules/pg/lib/connection.js:57:12)
at Socket.emit (events.js:400:28)
at TCP.null (net.js:686:12)
If so, and the credentials are correct, perhaps Postgres is bound to a specific IP address (usually 127.0.01.). This means it’s only accepting connections to the local host, not outside connections.
Which service (AWS, etc) is hosting this Postgres database?
Thanks @nktamanakov, screenshots speak a thousand words.
I was able to reproduce the issue on a brand new action. It appears that the output from the postgres insert statement always produces an error, like the one you shared.
However, it’s odd because for me it actually inserts the data into the database, just falsely errors in the workflow.
We’re investigating and I’ll get back to you when it’s fixed.
@nktamanakov could you please share that workflow with me as well? We may have found something, but just want to confirm it’s the same setup on your end.
You can add me (pierce@pipedream.com) or make it public and share the link here.
@nktamanakov Think we may have a solution for you, I tested it on my own workflow and it seems to solve the problem.
Instead of using the callbacks version of the PD query, try using the await query()way instead.
It may be that the workflow step is closing because the callback way doesn’t stop the workflow from “finishing”. This causes a race condition between the query & the workflow step.