jakeswenson / notion

Notion Offical API client library for rust
https://crates.io/crates/notion
MIT License
127 stars 61 forks source link

JsonParseError when a page contains not empty Files property. #64

Open gloridifice opened 6 months ago

gloridifice commented 6 months ago

When I query a database whose pages contain not empty Files property, this error occurs.

JsonParseError { source: Error("missing field `url`", line: 0, column: 0) }

Source:

    let works_pages = notion_api
        .query_database(works_database.id.clone(), DatabaseQuery::empty())
        .await.unwrap()
        .results;
raspirin commented 6 months ago

A collaborator of @gloridifice here. We found that due to the notion api change, the Page struct does not correspond to what the server returns, which causes this JsonParseError.