You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to update a People column in a database page (row), it seems that the User object is not being marshalled to the proper JSON object per the api.
notion: failed to update page properties: body failed validation. Fix one:
body.properties.Contributors.people[0].type should be not present, instead was `""`.
body.properties.Contributors.people[0].name should be not present, instead was `""`.
body.properties.Contributors.people[0].avatar_url should be not present, instead was `""`.
body.properties.Contributors.people[0].person should be not present or an object, instead was `null`.
body.properties.Contributors.people[0].bot should be not present or an object, instead was `null`. (code: validation_error, status: 400)
from looking at the source code, I suspect the problem might be that the struct don't have an omitempty tag on their respective JSON representation. I'm happy to contribute an MR if needed
The text was updated successfully, but these errors were encountered:
mikimichaeli
changed the title
User object not being unmarshalled properly when trying to update a user in the People type DatabasePageProperty
User object not being marshalled properly when trying to update a user in the People type DatabasePageProperty
Mar 27, 2024
Hi, great client!
When trying to update a People column in a database page (row), it seems that the User object is not being marshalled to the proper JSON object per the api.
Example usage of updating a page:
The output error shows:
from looking at the source code, I suspect the problem might be that the struct don't have an
omitempty
tag on their respective JSON representation. I'm happy to contribute an MR if neededThe text was updated successfully, but these errors were encountered: