evernote-common-errors
Diagnose and fix common Evernote API errors. Use when encountering Evernote API exceptions, debugging failures, or troubleshooting integration issues. Trigger with phrases like "evernote error", "evernote exception", "fix evernote issue", "debug evernote", "evernote troubleshooting".
What this skill does
# Evernote Common Errors
## Overview
Comprehensive guide to diagnosing and resolving Evernote API errors. Evernote uses three exception types: `EDAMUserException` (client errors), `EDAMSystemException` (server/rate limit errors), and `EDAMNotFoundException` (invalid GUIDs).
## Prerequisites
- Basic Evernote SDK setup
- Understanding of Evernote data model
## Instructions
### EDAMUserException Error Codes
| Code | Name | Cause | Fix |
|------|------|-------|-----|
| 1 | `BAD_DATA_FORMAT` | Invalid ENML, missing DOCTYPE | Validate ENML before sending; check for forbidden elements |
| 2 | `DATA_REQUIRED` | Missing required field (title, content) | Ensure `note.title` and `note.content` are set |
| 3 | `PERMISSION_DENIED` | API key lacks permissions | Request additional permissions from Evernote |
| 4 | `INVALID_AUTH` | Invalid or revoked token | Re-authenticate user via OAuth |
| 5 | `AUTH_EXPIRED` | Token past expiration date | Check `edam_expires`, refresh token |
| 6 | `LIMIT_REACHED` | Account limit exceeded (250 notebooks) | Clean up resources before creating new ones |
| 7 | `QUOTA_REACHED` | Monthly upload quota exceeded | Check `user.accounting.remaining` |
### ENML Validation
The most common error is `BAD_DATA_FORMAT` from invalid ENML. Validate before sending:
```javascript
function validateENML(content) {
const errors = [];
if (!content.includes('<?xml version="1.0"')) errors.push('Missing XML declaration');
if (!content.includes('<!DOCTYPE en-note')) errors.push('Missing DOCTYPE');
if (!content.includes('<en-note>')) errors.push('Missing <en-note> root');
const forbidden = [/<script/i, /<form/i, /<iframe/i, /<input/i];
forbidden.forEach(p => { if (p.test(content)) errors.push(`Forbidden: ${p.source}`); });
if (/\s(class|id|onclick)=/i.test(content)) errors.push('Forbidden attributes');
return { valid: errors.length === 0, errors };
}
```
### EDAMSystemException Handling
Rate limit errors include `rateLimitDuration` (seconds to wait). Maintenance errors should be retried with progressive backoff.
```javascript
async function withRetry(operation, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await operation();
} catch (error) {
if (error.rateLimitDuration) {
await new Promise(r => setTimeout(r, error.rateLimitDuration * 1000));
continue;
}
throw error;
}
}
}
```
### EDAMNotFoundException Handling
Thrown when a GUID does not exist (deleted note, wrong user, invalid format). Handle gracefully by returning null instead of throwing.
```javascript
async function safeGetNote(noteStore, guid) {
try {
return await noteStore.getNote(guid, true, false, false, false);
} catch (error) {
if (error.identifier === 'Note.guid') return null;
throw error;
}
}
```
### Error Handler Service
Build a centralized error handler that classifies exceptions and returns structured results with `type`, `code`, `action`, and `recoverable` flags. See [Implementation Guide](references/implementation-guide.md) for the complete `EvernoteErrorHandler` class.
## Output
- Error code reference table for all `EDAMUserException` codes
- ENML validation utility that catches common content errors
- Rate limit retry with `rateLimitDuration` handling
- Safe getter pattern for `EDAMNotFoundException`
- Centralized `EvernoteErrorHandler` service class
## Error Handling
| Exception | When Thrown | Recovery |
|-----------|------------|----------|
| `EDAMUserException` | Client error (invalid input, permissions) | Fix input or re-authenticate |
| `EDAMSystemException` | Server error (rate limits, maintenance) | Wait and retry |
| `EDAMNotFoundException` | Resource not found (invalid GUID) | Verify GUID, check trash |
## Resources
- [Error Handling](https://dev.evernote.com/doc/articles/error_handling.php)
- [Rate Limits](https://dev.evernote.com/doc/articles/rate_limits.php)
- [API Reference](https://dev.evernote.com/doc/reference/)
- [ENML DTD](http://xml.evernote.com/pub/enml2.dtd)
## Next Steps
For debugging tools and techniques, see `evernote-debug-bundle`.
## Examples
**ENML debugging**: Note creation fails with `BAD_DATA_FORMAT`. Run `validateENML()` on the content to identify missing DOCTYPE, unclosed tags, or forbidden elements like `<script>`.
**Token refresh flow**: API call returns `AUTH_EXPIRED` (code 5). Check stored `edam_expires` timestamp, redirect user to OAuth re-authorization, store new token with updated expiration.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.