Rest API post call from blob object not working (blob object rendered correctly)

Hi community,
my app is gaining users and I’m facing the first issues which i didn’t expect.
I rely on a rest API for db and when i run the app from my local machine the whole db gets updated correctly when i add, edit or delete an entry, but from the netlify interface the json file doesn’t get updated properly, meaning all past entries get deleted and replaced with the new one, instead of adding it at the end of the db object.
The json doesn’t get truncated so i guess this ain’t a problem of connection/latencies, but i honestly don’t have clues of what’s going on because i don’t see any errors on the main website dashboard.
Anyone got the same error recently?

Hi, @jilt. We don’t let you run a database at Netlify but you can attach to one hosted outside of Netlify. There are Netlify Functions but they run in AWS Lambda and are short lived processes without persistence. We have a support guide about this here:

Unless you are connecting to a database hosted outside of Netlify, the behavior you are seeing it expected behavior. Would you please confirm exactly where the database itself is hosted?

Thanks for your answer, the db is hosted outside of netlify!
I’ll check the link, and thanks again :slight_smile:

I would like to point out that the error persists, as far as your docs goes it should not happen, and I didn’t receive any answer as to what could cause it.

You left the thread saying you’ll check. So we never heard back from you to confirm if it was working fine or not.

Also, the description is insufficient. We don’t know what site you’re talking about, or how your DB or site is configured. We don’t know how to trigger or reproduce this behaviour.

Hey thanks for your answer, I’m using node.js and interacting with an http api.
Here is the code for my website:
you can also check the github pages, in which the website is running but can’t interact with the db because i can’t setup the environment variable with the web3token from there.
Steps to run the website:

  1. npm install
  2. export NEAR_ENV=testnet
  3. create a testnet account on
  4. near login
  5. npm start or npm dev:start
  6. API token for db can be obtained for free on
    Thanks for your answer

I believe this is for local testing, correct? Is there a way for us to see the error happening in production?

In your repo, could you point us to the exact part of your code where you’re making this API call?

I tried creating an account on, but it’s asking me that I need some tokens to log into the app.

Is there a way for you to provide us a minimal reproduction case without us having to create such accounts?

I just found a new error,
and it seems to come from the API query i do,
you can find it on the app.js file, line 126

Problem was solved using a relay server, thanks so muh for your support

1 Like

thanks for coming back and letting us know, @jilt. Happy building :rocket: