Summary
Some Notion API requests fail with HTTP 403 and a Cloudflare HTML body (Sorry, you have been blocked) instead of JSON. The sync logs the entire HTML as the error message, which is hard to diagnose and looks like a Notion permission failure.
Observed behavior
ERROR FAIL obsidian/Misc/HTML要点.md: 403 <!DOCTYPE html> ... Cloudflare ...
Your IP: 185.220.238.191
Other pages in the same run may succeed (e.g. CSS要点 updated OK) — intermittent WAF blocking, not missing Notion integration access.
Proposed solution
- In
notion_request / error handling, detect Cloudflare/HTML 403 responses (content-type, body markers).
- Raise a short, actionable error, e.g.:
- "Notion API blocked by Cloudflare (possible Tor/proxy IP). Retry from a different network or reduce request rate."
- Optionally extract Ray ID for support/debug.
- Consider limited retry with backoff for 403 HTML (may not help for hard blocks).
Acceptance criteria
References
mkdocs_note/utils/notion/client.py — notion_request
Summary
Some Notion API requests fail with HTTP 403 and a Cloudflare HTML body (
Sorry, you have been blocked) instead of JSON. The sync logs the entire HTML as the error message, which is hard to diagnose and looks like a Notion permission failure.Observed behavior
Other pages in the same run may succeed (e.g. CSS要点 updated OK) — intermittent WAF blocking, not missing Notion integration access.
Proposed solution
notion_request/ error handling, detect Cloudflare/HTML 403 responses (content-type, body markers).Acceptance criteria
References
mkdocs_note/utils/notion/client.py—notion_request