Foundry376/Mailspring · error

Grammar check rate limit reached, please try again shortly.

Error message

Grammar check rate limit reached, please try again shortly.

What it means

Thrown when the grammar-check endpoint returns HTTP 429: the client is sending checks too fast and is being rate limited. It is deliberately a generic transient error so the caller treats it as non-fatal and simply retries on the next dirty-state check.

Source

Thrown at app/internal_packages/composer-grammar-check/lib/grammar-check-service.ts:139

      data = await MailspringAPIRequest.makeRequest({
        server: 'identity',
        method: 'POST',
        path: '/api/grammar/check',
        json: true,
        body: {
          messageId,
          text,
          language: language || this.language,
        },
      });
    } catch (err) {
      // 400 = quota reached ("Quota Reached")
      if (err.statusCode === 400) {
        throw new UsageExceededError();
      }
      // 429 = rate limited — surface as a transient error, caller will retry on next dirty check
      if (err.statusCode === 429) {
        throw new Error('Grammar check rate limit reached, please try again shortly.');
      }
      // 502 = LanguageTool backend unavailable
      if (err.statusCode === 502) {
        throw new Error('Grammar check service is temporarily unavailable.');
      }
      throw err;
    }

    const filtered = data.matches.filter((match) => match.rule.issueType !== 'misspelling');

    return filtered.map((match) => ({
      offset: match.offset,
      length: match.length,
      message: match.message,
      shortMessage: match.shortMessage || '',
      replacements: match.replacements.map((r) => r.value),
      ruleId: match.rule.id,
      ruleDescription: match.rule.description,

View on GitHub (pinned to 648c685d60)

Solutions

  1. No user action needed: swallow the error and let the next debounce/dirty check retry automatically
  2. Add exponential backoff or increase the check debounce interval to avoid hammering the endpoint
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at app/internal_packages/composer-grammar-check/lib/grammar-check-service.ts:139 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Foundry376/Mailspring@648c685d60 (2026-09-03). Data as JSON: /api/errors/f2f481f58ab887bf. Report an issue: GitHub.