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
Expected behaviour
The code should save the page's properties.
Exceptions
1) Tests\Feature\NotionTest::test_example2
FiveamCode\LaravelNotionApi\Exceptions\NotionException: Bad Request: (validation_error) (body failed validation. Fix one:
body.properties.Name.id should be defined, instead was `undefined`.
body.properties.Name.headers should be not present, instead was `undefined`.
body.properties.Name.statusCode should be not present, instead was `400`.
body.properties.Name.body should be not present, instead was `{"object":"error","status":400,"code":"validation_error...`.
body.properties.Name.start should be defined, instead was `undefined`.)
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:272
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/fiveam-code/laravel-notion-api/src/Exceptions/NotionException.php:61
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/fiveam-code/laravel-notion-api/src/Endpoints/Endpoint.php:138
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/fiveam-code/laravel-notion-api/src/Endpoints/Pages.php:105
/Users/peterfox/Code/Experiments/sushi-and-notion/app/Models/Item.php:61
/Users/peterfox/Code/Experiments/sushi-and-notion/tests/Feature/NotionTest.php:27
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:174
Caused by
Illuminate\Http\Client\RequestException: HTTP request returned status code 400:
{"object":"error","status":400,"code":"validation_error","message":"body failed validation. Fix one:\nbody.properties.Na (truncated...)
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:272
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/fiveam-code/laravel-notion-api/src/Exceptions/NotionException.php:61
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/fiveam-code/laravel-notion-api/src/Endpoints/Endpoint.php:138
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/fiveam-code/laravel-notion-api/src/Endpoints/Pages.php:105
/Users/peterfox/Code/Experiments/sushi-and-notion/app/Models/Item.php:61
/Users/peterfox/Code/Experiments/sushi-and-notion/tests/Feature/NotionTest.php:27
/Users/peterfox/Code/Experiments/sushi-and-notion/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:174
Additional context
I've played around with the properties, and the rawContent structure needs to be corrected. When using the following classes, the page is updated as expected.
Describe the bug
When trying to update a page, it fails with a client exception due to the incorrect JSON format sent to Notion.
To Reproduce
The following code:
Expected behaviour
The code should save the page's properties.
Exceptions
Additional context
I've played around with the properties, and the rawContent structure needs to be corrected. When using the following classes, the page is updated as expected.
My guess is Notion has changed the format of the API and the package doesn't take account of that when it comes to updating.
The text was updated successfully, but these errors were encountered: