-
Notifications
You must be signed in to change notification settings - Fork 19
Description
the implementation on update_a_block is currently masking API rejections errors as empty responses.
As an example, sending a single RichText element containing a text of more than 2000 chars will result in a 400 rejection with error from the API. The client however, returns an Ok(..) with a defaulted UpdateABlockRequest .
If I understand it correctly, deserializing the resulting json body into a notion_client::objects::Response is meant to detect an error by deserialising an error response into a Response::Error variant - however, since the enum is marked as #[serde(untagged)] and untagged processing going in order of enum variants, it appears that a Response::Success(UpdateABlockRequest) is able to be deserialised from an error response - resulting in the error being masked as an empty result.