V5.2.2 - Nodejs - Postgresql
After updating to the latest version, I’m getting this error:
{
"status": "500",
"message": "Cannot read properties of undefined (reading 'toJSON')",
"stack": "TypeError: Cannot read properties of undefined (reading 'toJSON')\n at formatRecord (/opt/node_app/lib/core/app.js:346:40)\n at /opt/node_app/lib/core/app.js:367:45\n at Array.map (<anonymous>)\n at Object.options.postProcessResponse (/opt/node_app/lib/core/app.js:367:31)\n at Client_PG.postProcessResponse (/opt/node_app/node_modules/knex/lib/client.js:162:26)\n at /opt/node_app/node_modules/knex/lib/execution/runner.js:142:51\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async Runner.ensureConnection (/opt/node_app/node_modules/knex/lib/execution/runner.js:272:14)\n at async Runner.run (/opt/node_app/node_modules/knex/lib/execution/runner.js:30:19)"
}
It happens with the “COUNT” field:
It was working fine until the latest update, I didn’t touch/change anything related to this
After reverting back to version 5.2.0 it works again, so it seems that an update in 5.2.1 or 5.2.2 is causing the issue