| name | evernote-rate-limits |
| description | Handle Evernote API rate limits effectively.
Use when implementing rate limit handling, optimizing API usage,
or troubleshooting rate limit errors.
Trigger with phrases like "evernote rate limit", "evernote throttling",
"api quota evernote", "rate limit exceeded".
|
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","evernote","api"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Evernote Rate Limits
Overview
Evernote enforces rate limits per API key, per user. When exceeded, the API throws EDAMSystemException with errorCode: RATE_LIMIT_REACHED and rateLimitDuration (seconds to wait). Production integrations must handle this gracefully.
Prerequisites
- Evernote SDK setup
- Understanding of async/await patterns
- Error handling implementation
Instructions
Step 1: Rate Limit Handler
Catch EDAMSystemException and check for rateLimitDuration. Implement exponential backoff: wait the specified duration, then retry. Track retry attempts to avoid infinite loops.
async function withRateLimitRetry(operation, maxRetries = 3) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
return await operation();
} catch (error) {
if (error.rateLimitDuration && attempt < maxRetries - 1) {
const waitMs = error.rateLimitDuration * 1000;
console.log(`Rate limited. Waiting ${error.rateLimitDuration}s...`);
await new Promise(r => setTimeout(r, waitMs));
continue;
}
throw error;
}
}
}
Step 2: Rate-Limited Client Wrapper
Wrap the NoteStore with a class that adds configurable delays between API calls. Use a request queue to prevent bursts. Track request timestamps for monitoring.