Skip to content

fix: 'syncRecordValues' endpoint returns 404 error #661

@chugue

Description

@chugue

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

And I had an issue retrieving a page using the 'syncRecordValues' endpoint, which resulted in a 404 status code.

Here is the diff that solved my problem:

diff --git a/node_modules/notion-client/build/index.js b/node_modules/notion-client/build/index.js
index 2ad4eba..0377544 100644
--- a/node_modules/notion-client/build/index.js
+++ b/node_modules/notion-client/build/index.js
@@ -432,7 +432,7 @@ var NotionAPI = class {
   }
   async getBlocks(blockIds, kyOptions) {
     return this.fetch({
-      endpoint: "syncRecordValues",
+      endpoint: "syncRecordValuesMain",
       body: {
         requests: blockIds.map((blockId) => ({
           // TODO: when to use table 'space' vs 'block'?

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions