agentsclimarketplace

Evernote common errors

Skill ComeOnOliver/skillshub/skills/jeremylongshore/claude-code-plugins-plus-skills/evernote-common-errors

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill evernote-common-errors

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

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".

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.0 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

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

CodeNameCauseFix
1BAD_DATA_FORMATInvalid ENML, missing DOCTYPEValidate ENML before sending; check for forbidden elements
2DATA_REQUIREDMissing required field (title, content)Ensure note.title and note.content are set
3PERMISSION_DENIEDAPI key lacks permissionsRequest additional permissions from Evernote
4INVALID_AUTHInvalid or revoked tokenRe-authenticate user via OAuth
5AUTH_EXPIREDToken past expiration dateCheck edam_expires, refresh token
6LIMIT_REACHEDAccount limit exceeded (250 notebooks)Clean up resources before creating new ones
7QUOTA_REACHEDMonthly upload quota exceededCheck user.accounting.remaining

ENML Validation

The most common error is BAD_DATA_FORMAT from invalid ENML. Validate before sending:

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.

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.

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 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

ExceptionWhen ThrownRecovery
EDAMUserExceptionClient error (invalid input, permissions)Fix input or re-authenticate
EDAMSystemExceptionServer error (rate limits, maintenance)Wait and retry
EDAMNotFoundExceptionResource not found (invalid GUID)Verify GUID, check trash

Resources

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.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.