---
title: Error Handling
description: "# API Error Handling All errors follow WordPress REST API standards. ## Error Response Format | Field | Description | | --- | --- | | code | Machine-readable error code | | message | Human-readable message | | data.status…"
url: "https://dmsi.gr/docs/ddls/ddls-api-documentation/api-error-handling/"
updated: "2026-03-31"
category: DDLS / API Documentation
---

# Error Handling

# API Error Handling

All errors follow WordPress REST API standards.

## Error Response Format

| Field | Description |
| --- | --- |
| code | Machine-readable error code |
| message | Human-readable message |
| data.status | HTTP status code |

## Common Error Codes

| Code | Status | Description |
| --- | --- | --- |
| rest_forbidden | 403 | Authentication required |
| rest_rate_limit | 429 | Rate limit exceeded |
| dmsilm_license_not_found | 404 | License not found |
| dmsilm_license_invalid | 400 | License invalid or expired |
| dmsilm_license_expired | 400 | License has expired |
| dmsilm_license_suspended | 400 | License is suspended |
| dmsilm_activation_limit_reached | 400 | Maximum activations reached |
| dmsilm_activation_not_found | 404 | Activation not found |
| dmsilm_product_mismatch | 400 | License does not match the provided product_id (added v2.0.0) |

## The dmsilm_product_mismatch Error (New in v2.0.0)

All public endpoints now validate that the license key belongs to the product identified by `product_id`. If they do not match, the request is rejected with:

```json
{
  "code": "dmsilm_product_mismatch",
  "message": "License does not belong to the specified product.",
  "data": { "status": 400 }
}
```

**Common cause:** The same license key being used with a different product's `product_id` in the request. Each license is bound to the product it was created for and cannot be used to activate a different product.

## HTTP Status Codes

| Code | Meaning |
| --- | --- |
| 200 | Success |
| 201 | Created |
| 400 | Bad request (invalid params, product mismatch, license state) |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not found |
| 429 | Rate limited |
| 500 | Server error |
