Skip to content

Error Codes ​

Reference for all error codes returned by the PackEdge API.

HTTP Status Codes ​

StatusMeaning
200Success
400Bad request — invalid parameters or business logic error
401Unauthorized — invalid or missing authentication
403Forbidden — valid auth but insufficient permissions
404Not found — resource doesn't exist
429Too many requests — rate limit exceeded
500Internal server error

Error Response Format ​

All errors return a JSON response with an error field:

json
{
  "error": "License has expired"
}

Some endpoints also return valid: false for validation failures:

json
{
  "valid": false,
  "error": "License has expired"
}

License Errors ​

Validation Errors ​

ErrorDescription
Invalid public_keyProduct public key not found
License key not foundLicense doesn't exist
License has expiredLicense past expiration date
License is suspendedLicense temporarily disabled
License is revokedLicense permanently disabled

Activation Errors ​

ErrorDescription
License seat limit reachedAll seats in use
License is suspendedCannot activate suspended license
License has expiredCannot activate expired license
Domain is requiredMissing domain parameter

Deactivation Errors ​

ErrorDescription
Activation not foundNo activation for this domain
Domain or activation_id requiredMissing identifier

Product Errors ​

ErrorDescription
Product not foundInvalid product slug
Product is not activeProduct in draft or archived state

Download Errors ​

ErrorDescription
Release not foundInvalid release ID
Invalid or expired licenseLicense cannot access downloads
Product does not manage releasesRelease distribution disabled

Webhook Errors ​

ErrorDescription
Invalid signatureWebhook signature verification failed
Webhook not foundInvalid webhook ID

Handling Errors ​

PHP Example ​

php
$response = wp_remote_post($url, $args);

if (is_wp_error($response)) {
    // Network error
    error_log('Network error: ' . $response->get_error_message());
    return;
}

$code = wp_remote_retrieve_response_code($response);
$body = json_decode(wp_remote_retrieve_body($response), true);

if ($code !== 200) {
    $error = $body['error'] ?? 'Unknown error';

    switch ($error) {
        case 'License has expired':
            // Handle expired license
            break;
        case 'License seat limit reached':
            // Handle seat limit
            break;
        default:
            error_log('API error: ' . $error);
    }
}

JavaScript Example ​

javascript
try {
    const response = await fetch(url, options);
    const data = await response.json();

    if (!response.ok) {
        switch (data.error) {
            case 'License has expired':
                // Handle expired
                break;
            case 'License seat limit reached':
                // Handle seat limit
                break;
            default:
                console.error('API error:', data.error);
        }
    }
} catch (error) {
    console.error('Network error:', error);
}