The DbAccountTransaction #102512 does not exist

Expected behaviour

When creating a record using the standard forest admin REST functionality it should not error

Actual behaviour

The record is created, but the request errors with a 404. After refreshing the error page, we see the record that was just created, with the ID that was shown in the error (in this case 102512)

Failure Logs

{“errors”:[{“status”:404,“detail”:“The DbAccountTransaction #102512 does not exist.”,“name”:“NotFoundError”}]}

Context

Please provide any relevant information about your setup.

  • Package Version: “forest-express-sequelize”: “8.4.7”,
  • Express Version: “express”: “4.17.1”,
  • Sequelize Version: “sequelize”: “6.6.2”,
  • Database Dialect: postgresql

Hi @JoshBridgement :wave: welcome to our community.

I have some questions:

  • what is your project name
  • it is a Forest Admin generated project or an In-App installation
  • can you share with us the network tab of your browser console when you create the record

Thanks :pray: .

Hi @Arnaud_Moncel

Thanks for the welcome :slightly_smiling_face:

Sure, our project name is Bridgement.1

It is an in-app installation (Node+express backend)

Please see screenshots below:



Hey @JoshBridgement :wave:

It looks like the response of the /DbAccountTransaction endpoint does not embed the id of the record in the attributes section. Did you override this route?
Sending back the id of the record should definitely fix the issue, as id is a mandatory field for the models to load correctly.

Let me know if you did override this route. If not, sharing the model here or as DM if you consider it private may help to assist you better :slight_smile:

Thanks I have DM’ed you the model (route is not overridden)

I’m guessing the issue is similar to the one I reported for this thread (The fact that we need a field named id(And in both of your cases, it’s Id…)

I’ll need to investigate to see if I’m able to reproduce this case. However, javascript project generated with forest-cli are able to handle this, so I’m pretty sure this is due to the typescript migration here.

Do you experience this issue on all your models ?

Yes - we experience the same issue on all models.

I see you were able to reproduce the issue on the other ticket so hopefully this case will be the same.

Please let me know if there’s any further info we can provide that might help.

Thanks for the help

1 Like

Thanks - this seems to be fixed in forest-express-sequelize 8.4.10

2 Likes