Question

Node.JS Issues writing to Google Cloud SQL but can read just fine

I have a Node API on a Droplet with a React Front End. When I spin up the environments locally the API read/writes just fine but when I deploy them on their respective Droplets, I can read data from the Node API but I can not write data.

The react Droplet can read and display the data from the API droplet but when it writes, the API sends a 200 response but no data is actually written.

When I investigate on the API Droplet server, I don’t notice anything in the error logs (Nginx) but apparently I am missing something.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi,

Consider following scenario, please. Your API has got a bug, supposedly. You get an OK status (200) because data was successfully transferred from front-end app to back-end, without checking if it was actually written. So, I would start troubleshooting your issue on Google Cloud SQL side. I would check permissions for accessing SQL database.