T
Twenty3mo ago
Alex

Issue with listing notes

Hi all, I'm currently self-hosting Twenty version 0.40.0. I've been working on using the rest API to create and modify notes, and I accidentally ran a request that had an incomplete body field:
'body': '[{"content":[{"type":"text","text":"example-bucket-id","styles":{}}]}]'
'body': '[{"content":[{"type":"text","text":"example-bucket-id","styles":{}}]}]'
The request went through and I got a 201 response. Afterwards, when I tried the GET /notes endpoint, I got this error:
{"statusCode":400,"messages":["Unexpected token e in JSON at position 0"],"error":"Bad Request"}
{"statusCode":400,"messages":["Unexpected token e in JSON at position 0"],"error":"Bad Request"}
I assumed this might be due to my added note from earlier, so I deleted that note, and it's associated timelineActivity object, using the rest API. However, my error still persists. Any ideas?
1 Reply
Prastoin
Prastoin3mo ago
Hello Alex ! I would recommend upgrading your Twenty instance to the latest version You might have inserted corrupted data within the database You could try cleaning up manually your notes tables searching for broken json or maybe empty body 🤔

Did you find this page helpful?