DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsError HandlingError Codes
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Error CodesRate LimitsDebugging
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Error Codes

Standard error response format and common error codes.

Updated March 29, 2026

On this page
  • Overview
  • Error Response Format
  • Catching Errors in the SDK
  • Common Error Codes
  • Error Handling Pattern
  • Next Steps

Overview

All API errors follow a consistent structure. The SDK throws errors with a message and status property.

Error Response Format

json
{
  "error": "not_found",
  "message": "Product not found",
  "details": "No product with slug 'nonexistent'"
}

Catching Errors in the SDK

typescript
import dash from "@/lib/dash"

try {
  const { product } = await dash.products.get("nonexistent")
} catch (error) {
  console.log(error.message)  // "Product not found"
  console.log(error.status)   // 404
}

Common Error Codes

ErrorStatusDescription
invalid_json400Malformed request body
missing_fields400Required field missing
validation_error400Input validation failed
unauthorized401Missing or invalid authentication
forbidden403Insufficient permissions
not_found404Resource not found
rate_limit429Too many requests
server_error500Internal server error
cart_not_found404Cart expired or invalid
cart_validation_failed400Cart items have issues (out of stock)
invalid_code400Invalid discount code
auth_error401Authentication operation failed

Error Handling Pattern

typescript
async function safeApiCall<T>(fn: () => Promise<T>): Promise<T | null> {
  try {
    return await fn()
  } catch (error) {
    if (error.status === 404) {
      // Resource not found — show 404 page
      return null
    }
    if (error.status === 429) {
      // Rate limited — show retry message
    }
    throw error // Re-throw unexpected errors
  }
}

Next Steps

  • Rate Limits — Understanding rate limiting
  • Debugging — Debugging tips
  • REST API Error Responses — Full error reference
PreviousCOA / Lab ReportsNextRate Limits

On this page

  • Overview
  • Error Response Format
  • Catching Errors in the SDK
  • Common Error Codes
  • Error Handling Pattern
  • Next Steps