notion-reliability-patterns
Installation
SKILL.md
Notion Reliability Patterns
Overview
Production-grade reliability patterns for Notion integrations. Covers graceful degradation with offline cache when Notion is unavailable, retry with exponential backoff for transient failures, circuit breaker to prevent cascade failures, health check endpoints for monitoring, and fallback content serving when the API is unreachable. All patterns use Client from @notionhq/client and handle Notion-specific error codes.
Prerequisites
@notionhq/clientv2.x installed (npm install @notionhq/client)lru-cachefor in-memory caching (npm install lru-cache)- Python:
notion-clientinstalled (pip install notion-client) NOTION_TOKENenvironment variable set- Understanding of circuit breaker and retry patterns
Instructions
Step 1: Retry with Exponential Backoff
The Notion SDK has built-in retries, but you can customize the behavior for better control over transient errors (429, 500, 502, 503).