notion-dotnet / notion-sdk-net

A Notion SDK for .Net
MIT License
181 stars 46 forks source link

`link_preview` block type is not supported #323

Closed hikeda closed 1 year ago

hikeda commented 2 years ago

If the page contains link_preview blocks, BlocksClient.RetrieveChildrenAsync throws the following exception. (version: 4.0.0-preview-4.9.11.2022)

Newtonsoft.Json.JsonSerializationException: Error converting value "link_preview" to type 'Notion.Client.BlockType'. Path 'type', line 1, position 470.
 ---> System.ArgumentException: Requested value 'link_preview' was not found.
   at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, String value, Boolean disallowNumber)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   --- End of inner exception stack trace ---

https://developers.notion.com/reference/block#link-preview-blocks https://developers.notion.com/changelog/link-previews-block-and-rich_text-supported-in-response

KoditkarVedant commented 2 years ago

Fix is released in version - 4.0.0-preview-5.9.15.2022

KoditkarVedant commented 1 year ago

4.0.0 Released