hubspot-reliability-patterns

Featured

Implement HubSpot reliability patterns: circuit breakers, retries, and graceful degradation. Use when building fault-tolerant HubSpot integrations, implementing retry strategies, or adding resilience to production CRM services. Trigger with phrases like "hubspot reliability", "hubspot circuit breaker", "hubspot resilience", "hubspot fallback", "hubspot fault tolerant".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# HubSpot Reliability Patterns ## Overview Production-grade reliability patterns for HubSpot CRM integrations: circuit breaker, retry with Retry-After, graceful degradation, and dead letter queues. ## Prerequisites - `@hubspot/api-client` installed (has built-in retry) - Optional: `opossum` for circuit breaker - Optional: Redis or database for dead letter queue ## Instructions ### Step 1: SDK Built-in Retry (First Line of Defense) ```typescript import * as hubspot from '@hubspot/api-client'; // The SDK automatically retries 429 and 5xx errors const client = new hubspot.Client({ accessToken: process.env.HUBSPOT_ACCESS_TOKEN!, numberOfApiCallRetries: 3, // retries with exponential backoff }); // This handles most transient failures automatically ``` ### Step 2: Circuit Breaker for HubSpot API ```typescript import CircuitBreaker from 'opossum'; // Circuit breaker wrapping all HubSpot API calls const hubspotBreaker = new CircuitBreaker( async <T>(operation: () => Promise<T>): Promise<T> => operation(), { timeout: 15000, // 15s timeout per call errorThresholdPercentage: 50, // open after 50% failure rate resetTimeout: 30000, // try again after 30s volumeThreshold: 5, // need 5+ calls before evaluating rollingCountTimeout: 60000, // 60s rolling window } ); // Monitor circuit state hubspotBreaker.on('open', () => { console.warn('[HubSpot] Circuit OPEN -- requests failing fast'); // Alert team: Hub...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category