hubspot-common-errors

Diagnose and fix common HubSpot API errors with real error responses. Use when encountering HubSpot errors, debugging failed API requests, or troubleshooting integration issues with specific HTTP status codes. Trigger with phrases like "hubspot error", "fix hubspot", "hubspot 401", "hubspot 429", "hubspot not working", "debug hubspot API".

1,868 stars

Best use case

hubspot-common-errors is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Diagnose and fix common HubSpot API errors with real error responses. Use when encountering HubSpot errors, debugging failed API requests, or troubleshooting integration issues with specific HTTP status codes. Trigger with phrases like "hubspot error", "fix hubspot", "hubspot 401", "hubspot 429", "hubspot not working", "debug hubspot API".

Teams using hubspot-common-errors should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/hubspot-common-errors/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/saas-packs/hubspot-pack/skills/hubspot-common-errors/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/hubspot-common-errors/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How hubspot-common-errors Compares

Feature / Agenthubspot-common-errorsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Diagnose and fix common HubSpot API errors with real error responses. Use when encountering HubSpot errors, debugging failed API requests, or troubleshooting integration issues with specific HTTP status codes. Trigger with phrases like "hubspot error", "fix hubspot", "hubspot 401", "hubspot 429", "hubspot not working", "debug hubspot API".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# HubSpot Common Errors

## Overview

Quick reference for the most common HubSpot API errors, their real error response bodies, and solutions.

## Prerequisites

- `@hubspot/api-client` installed
- API credentials configured
- Access to application logs

## Instructions

### Step 1: Identify the Error

Check the HTTP status code and response body. HubSpot returns structured errors:

```json
{
  "status": "error",
  "message": "One or more validation errors occurred",
  "correlationId": "abc123-def456",
  "category": "VALIDATION_ERROR",
  "errors": [
    {
      "message": "Property values were not valid: [{\"isValid\":false,\"message\":\"...\"}]",
      "context": { "propertyName": "email" }
    }
  ]
}
```

### Step 2: Match and Fix

---

### 401 Unauthorized

**Real response:**
```json
{
  "status": "error",
  "message": "Authentication credentials not found. This API supports OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview",
  "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "category": "INVALID_AUTHENTICATION"
}
```

**Causes:**
- Missing `Authorization: Bearer` header
- Expired OAuth access token (30-minute TTL)
- Revoked or regenerated private app token

**Fix:**
```bash
# Verify token is set and valid
curl -s https://api.hubapi.com/crm/v3/objects/contacts?limit=1 \
  -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" | jq .status
# Should return null (success) or "error"
```

---

### 403 Forbidden

**Real response:**
```json
{
  "status": "error",
  "message": "This access token does not have proper permissions. (requires any of [crm.objects.contacts.write])",
  "correlationId": "...",
  "category": "MISSING_SCOPES"
}
```

**Fix:** Add the missing scope to your private app in Settings > Integrations > Private Apps, then regenerate the token.

---

### 409 Conflict

**Real response:**
```json
{
  "status": "error",
  "message": "Contact already exists. Existing ID: 12345",
  "correlationId": "...",
  "category": "CONFLICT"
}
```

**Fix:** Search before creating, or use batch upsert:
```typescript
// Use search-first pattern
const existing = await client.crm.contacts.searchApi.doSearch({
  filterGroups: [{
    filters: [{ propertyName: 'email', operator: 'EQ', value: email }],
  }],
  properties: ['email'],
  limit: 1, after: 0, sorts: [],
});

if (existing.results.length > 0) {
  await client.crm.contacts.basicApi.update(existing.results[0].id, { properties });
} else {
  await client.crm.contacts.basicApi.create({ properties, associations: [] });
}
```

---

### 429 Too Many Requests

**Real response:**
```json
{
  "status": "error",
  "message": "You have reached your secondly limit.",
  "correlationId": "...",
  "category": "RATE_LIMITS"
}
```

**Headers returned:**
```
X-HubSpot-RateLimit-Daily: 500000
X-HubSpot-RateLimit-Daily-Remaining: 499950
X-HubSpot-RateLimit-Secondly: 10
X-HubSpot-RateLimit-Secondly-Remaining: 0
Retry-After: 1
```

**Fix:** Honor `Retry-After` header and use SDK built-in retries:
```typescript
const client = new hubspot.Client({
  accessToken: process.env.HUBSPOT_ACCESS_TOKEN!,
  numberOfApiCallRetries: 3, // auto-retries 429s with backoff
});
```

---

### 400 Validation Error (Property)

**Real response:**
```json
{
  "status": "error",
  "message": "Property values were not valid: [{\"isValid\":false,\"message\":\"Property \\\"nonexistent_field\\\" does not exist\",\"error\":\"PROPERTY_DOESNT_EXIST\",\"name\":\"nonexistent_field\"}]",
  "correlationId": "...",
  "category": "VALIDATION_ERROR"
}
```

**Fix:**
```typescript
// List available properties for an object type
// GET /crm/v3/properties/{objectType}
const properties = await client.crm.properties.coreApi.getAll('contacts');
const propNames = properties.results.map(p => p.name);
console.log('Available contact properties:', propNames);
```

---

### 400 Invalid Association

**Real response:**
```json
{
  "status": "error",
  "message": "association type id 999 doesn't exist between contact and company",
  "correlationId": "...",
  "category": "VALIDATION_ERROR"
}
```

**Common association type IDs:**

| From | To | TypeId | Label |
|------|----|--------|-------|
| Contact | Company | 1 | Primary |
| Contact | Deal | 3 | -- |
| Company | Deal | 5 | -- |
| Contact | Ticket | 16 | -- |
| Note | Contact | 202 | -- |
| Task | Contact | 204 | -- |
| Note | Deal | 214 | -- |

---

### 404 Not Found (Archived Record)

**Real response:**
```json
{
  "status": "error",
  "message": "Object not found. objectType=contacts, objectId=12345. It may have been deleted.",
  "correlationId": "...",
  "category": "OBJECT_NOT_FOUND"
}
```

**Fix:** The record may be archived. Check with `archived=true`:
```typescript
const contact = await client.crm.contacts.basicApi.getById(
  '12345',
  ['email'],
  undefined,
  undefined,
  true // archived = true
);
```

## Output

- Error identified by HTTP status and category
- Root cause determined
- Fix applied with working code
- Verified resolution

## Error Handling

### Catch-All Error Handler

```typescript
import { HttpError } from '@hubspot/api-client/lib/codegen/crm/contacts';

async function handleHubSpotError(error: any): Promise<void> {
  const status = error?.code || error?.statusCode || 500;
  const body = typeof error?.body === 'string' ? JSON.parse(error.body) : error?.body || {};

  console.error(`HubSpot API Error [${status}]`, {
    message: body.message,
    category: body.category,
    correlationId: body.correlationId,
    errors: body.errors,
  });

  // Save correlationId for support tickets
  if (status >= 500) {
    console.error('HubSpot server error. Check https://status.hubspot.com');
  }
}
```

## Examples

### Quick Diagnostic Commands

```bash
# Check HubSpot API status
curl -s https://status.hubspot.com/api/v2/summary.json | jq '.status.description'

# Verify token and scopes
curl -s https://api.hubapi.com/crm/v3/objects/contacts?limit=1 \
  -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \
  -w "\nHTTP Status: %{http_code}\n"

# Check rate limit headers
curl -sI https://api.hubapi.com/crm/v3/objects/contacts?limit=1 \
  -H "Authorization: Bearer $HUBSPOT_ACCESS_TOKEN" \
  | grep -i ratelimit
```

## Resources

- [HubSpot Error Handling Guide](https://developers.hubspot.com/docs/api-reference/error-handling)
- [HubSpot Status Page](https://status.hubspot.com)
- [Association Type IDs](https://developers.hubspot.com/docs/guides/api/crm/associations)

## Next Steps

For comprehensive debugging, see `hubspot-debug-bundle`.

Related Skills

workhuman-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Workhuman common errors for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman common errors".

wispr-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Wispr Flow common errors for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr common errors".

windsurf-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix common Windsurf IDE and Cascade errors. Use when Cascade stops working, Supercomplete fails, indexing hangs, or encountering Windsurf-specific issues. Trigger with phrases like "windsurf error", "fix windsurf", "windsurf not working", "cascade broken", "windsurf slow".

webflow-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Webflow Data API v2 errors — 400, 401, 403, 404, 409, 429, 500. Use when encountering Webflow API errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "webflow error", "fix webflow", "webflow not working", "debug webflow", "webflow 429", "webflow 401".

vercel-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix common Vercel deployment and function errors. Use when encountering Vercel errors, debugging failed deployments, or troubleshooting serverless function issues. Trigger with phrases like "vercel error", "fix vercel", "vercel not working", "debug vercel", "vercel 500", "vercel build failed".

veeva-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Veeva Vault common errors for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva common errors".

vastai-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Vast.ai common errors and exceptions. Use when encountering Vast.ai errors, debugging failed instances, or troubleshooting GPU rental issues. Trigger with phrases like "vastai error", "fix vastai", "vastai not working", "debug vastai", "vastai instance failed".

twinmind-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix TwinMind common errors and exceptions. Use when encountering transcription errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "twinmind error", "fix twinmind", "twinmind not working", "debug twinmind", "transcription failed".

together-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Together AI common errors for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together common errors".

techsmith-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

TechSmith common errors for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith common errors".

supabase-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Diagnose and fix Supabase errors across PostgREST, PostgreSQL, Auth, Storage, and Realtime. Use when encountering error codes like PGRST301, 42501, 23505, or auth failures. Use when debugging failed queries, RLS policy violations, or HTTP 4xx/5xx responses. Trigger with "supabase error", "fix supabase", "PGRST", "supabase 403", "RLS not working", "supabase auth error", "unique constraint", "foreign key violation".

stackblitz-common-errors

1868
from jeremylongshore/claude-code-plugins-plus-skills

Fix WebContainer and StackBlitz errors: COOP/COEP, SharedArrayBuffer, boot failures. Use when WebContainers fail to boot, embeds don't load, or processes crash inside WebContainers. Trigger: "stackblitz error", "webcontainer error", "SharedArrayBuffer not defined".