Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes REST API (POST & PUT) - Internal Server Errors for all Notes thrown when body array contains 9 or more items created by API #7444

Closed
skyfox675 opened this issue Oct 5, 2024 · 4 comments
Assignees
Labels
scope: backend Issues that are affecting the backend side only

Comments

@skyfox675
Copy link

Bug Description

Hi Team,

After a while of debugging I found that when creating notes (or updating them) the maximum body length can be 8 items consisting of:

{
        "type": "heading",
        "props": {
            "textColor": "default",
            "backgroundColor": "default",
            "textAlignment": "left",
            "level": 3
        },
        "content": [
            {
                "type": "text",
                "text": "question",
                "styles": {}
            }
        ],
        "children": [
            {
                "type": "paragraph",
                "props": {
                    "textColor": "default",
                    "backgroundColor": "default",
                    "textAlignment": "left"
                },
                "content": [
                    {
                        "type": "text",
                        "text": "answer",
                        "styles": {}
                    }
                ],
                "children": []
            }
        ]
    }

This seems to be related to #6608

Example:
Exceeding 8 items:

[
{
"data": {
"updateNote": {
"id": "57447027-2348-4003-abdc-6d6f056da185",
"position": null,
"title": "api test 2",
"body": "[{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What's your first name?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nick","styles":{}}],"children":[]}]},{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What's your last name?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Adams","styles":{}}],"children":[]}]},{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What's your email?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"[email protected]","styles":{}}],"children":[]}]},{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What's your phone number?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"0000000000","styles":{}}],"children":[]}]},{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What is this for?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Business 💼","styles":{}}],"children":[]}]},{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What is your business name?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Joe's crab shack 🦀","styles":{}}],"children":[]}]},{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What is the business phone number?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"0000000000","styles":{}}],"children":[]}]},{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What is the business email?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"[email protected]","styles":{}}],"children":[]}]},{"type":"heading","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left","level":3},"content":[{"type":"text","text":"What's the address?","styles":{}}],"children":[{"type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":["1234 Main Street #123","","New York","New York","12345","United States"],"styles":{}}],"children":[]}]}]",
"createdAt": "2024-10-05T03:59:06.807Z",
"updatedAt": "2024-10-05T04:29:30.635Z",
"deletedAt": null,
"createdBy": {
"source": "API",
"workspaceMemberId": null,
"name": "Formbricks.com via N8n"
}
}
}
}
]
image

Technical inputs

Version: v0.30.2
Hosting: Self-Hosted

@skyfox675 skyfox675 changed the title Notes REST API (POST & PUT) - Internal Server Errors for all Notes thrown when body array contains 9 or more items Notes REST API (POST & PUT) - Internal Server Errors for all Notes thrown when body array contains 9 or more items created by API Oct 5, 2024
@Apetree100122
Copy link

 { "type": "heading",       
"props": { "TextColor":
"default",
"Background Color": 
"default",
"Text_Alignment : "left", "level": 3 },       
"content": [ {  "type": "text",
"text": "question",               
"styles": {}],  \ "children": [ { "type":
"paragraph", "props": {  "textColor": "default",              
  "backgroundColor": "default",
       "textAlignment": "left"            
 },"content": [ { "type": "text",                      
"text": "answer",                 
"styles": {} } ],    
 "children": []
}

related to
https://github.com/twentyhq/twenty
Issue: #6608
Example:
Exceeding 8 items:


    [
{
 "data": {
"updateNote": {
 "id": "57447027-2348-4003-abdc-6d6f056da185",
 "position":
 null,
 "title": "api test 2",
 "body": 
"[{"type":"heading","props":{"textColor":
"default",
"background Color":
"default"
,"textAlignment":
"left","level":3},
"content":[{"type":
"text",
"text":
"Whats your first name?", 
"default","backgroundColor": 
"default","textAlignment":"left"}  
"content":[{"type":"text",   "1234 Main Street #123"," "  "New York","New York" 
 "12345","United States"], "styles":{],   "children":[]",- 
- "createdAt": "2024-10-05T03:59:06.807Z",     
-  
"updatedAt": "2024-10-05T04:29:30.635Z",
deletedAt": 
  [ ] 
"CreatedBy": [ ]   "source": "API",
 "Workspace
MemberId":  [ ]  
"name":    "Formbricks.com    @ via N8n"
}
] ;

@Bonapara Bonapara added the scope: backend Issues that are affecting the backend side only label Oct 7, 2024
@Bonapara
Copy link
Member

Bonapara commented Oct 7, 2024

@Weiko What do you think?

@skyfox675
Copy link
Author

skyfox675 commented Oct 10, 2024

@Bonapara & @Weiko, Not sure what the LoE to resolve this is, but as a user I would be ok with a bodyAppend attribute on PATCH to add more items to an existing Note.

@FelixMalfait
Copy link
Member

Closing as the new #9534 will solve this, new API - RICH_TEXT becomes a composite fields with 2 subfields (one with the complex format, one with simple markdown format)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: backend Issues that are affecting the backend side only
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants