Comments (3)
I added a catch clause to that which should at least catch that error.
Maybe you could try again and provide some steps for reproduction?
from notion-api.
Repro steps:
- insert
token_v2
onindex.js
- adding getPageById method on
index.js
:
api.getPageById('_PAGE_ID_GOES_HERE_').then(response => {
console.log(response)
})
- Run
npm start
TypeError: Cannot read property 'block' of undefined
at fetch.then.r (D:\Dev\notion-api\src\notion.js:52:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
undefined
from notion-api.
Apparently I make a mistake on the PAGE_ID
, it should be formatted to uuid.v4
with dashes
1de563e0bb234a3ab4c84fa0b6acb9dc
-> 1de563e0-bb23-4a3a-b4c8-4fa0b6acb9dc
from notion-api.
Related Issues (9)
- Cannot get expect Html HOT 3
- Max blocks per page? HOT 1
- HTML doesn't return img tags
- I get "Authentication Error: Please check your token! error" message. HOT 1
- Invalid Input when doing a getPageById HOT 7
- Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html".
- TypeError prevents object creation. HOT 2
- Getting subpageId by pageId HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notion-api.