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

link_preview block type is not supported #323

Closed
hikeda opened this issue Sep 13, 2022 · 2 comments · Fixed by #324
Closed

link_preview block type is not supported #323

hikeda opened this issue Sep 13, 2022 · 2 comments · Fixed by #324
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@hikeda
Copy link

hikeda commented Sep 13, 2022

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 KoditkarVedant linked a pull request Sep 14, 2022 that will close this issue
10 tasks
@KoditkarVedant KoditkarVedant self-assigned this Sep 14, 2022
@KoditkarVedant KoditkarVedant added the enhancement New feature or request label Sep 14, 2022
@KoditkarVedant KoditkarVedant added this to the 4.0.0 milestone Sep 14, 2022
@KoditkarVedant
Copy link
Contributor

Fix is released in version - 4.0.0-preview-5.9.15.2022

@KoditkarVedant
Copy link
Contributor

4.0.0 Released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants