Now, while creating Level 2 document if you pass list of Level 1 doc and for testing purpose, if you pass wrong data type for any of the artibute for example let's say Level 1 doc have attribute phone-number -> as interger and if you pass phoneNumber attrubute key as String "12345" . It return error 500 in the response in the clinet side.
Instead it should return normal 4xx error.
Summary
Users are experiencing a server error 500 when creating a child document with an invalid data argument in a relationship. This error occurs randomly and seems to occur more frequently as the database size increases. Some users have also encountered errors when deleting or updating documents with relationships. One user suggests that creating a demo internal project with many relationships could help identify and fix these issues. The user suggests creating a GitHub issue and providing screenshots to facilitate problem-solving. Another user reports the same issue on two projects and finds it very annoying. The user clarifies that the issue arises when creating a document with an invalid attribute and then appending it to another document as a relation
42Tom
Jul 18, 2023, 17:40
I have the same issue on 2 projects and it's very annoying.
To clarify, my issue is that I can create a doc with invalid attribute (for example, a string longer than its attribute size), but then it breaks everything when appended to another doc as a relation.
It should be impossible to create a document with a wrong attribute in the first place.
D5
Moderator
Jul 18, 2023, 22:38
Could you please then create a GitHub issue describing the problem?
If you add screenshots, etc it would be really useful to make it easier for maintainers finding and solving the issue 😄
42Tom
Jul 18, 2023, 22:47
Unfortunately this error seems quite inconsistant and is not appearing everytime.
I think it could be very good for the core team to create a demo internal project involving a lot of relationhips, there are a lot of unhandled 500 happening randomly while deleting or updating documents.
A strange bug that also happened to me today is that I needed to update all relationship fields when updating a single string field, otherwise it yielded a 500 error.
Lots of small random errors that are very hard to reproduce.
A pattern I noticed in these errors is that they tend to happen once the project starts getting big. Playing with only a few level of relationship and a few documents is generally fine. Once the database starts getting bigger these random 500 starts to happen.
Vedsaga
Rank 5: Hypervisor
Jul 19, 2023, 04:38
the core team to create a demo internal project involving a lot of relationhips
I second this, this will people help contribute and tend to slowly cover all edge cases one by one...