Error Codes Overview#
Jalpi Page Builder follows the standard WordPress WP_Error convention for all API and AJAX responses. When an operation fails, the API responds with an appropriate HTTP status code (4xx or 5xx) and returns a structured JSON payload containing a machine-readable code, human-readable message, and status metadata:
{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to edit this page.",
"data": {
"status": 403
}
}REST API Error Codes#
| Error Code | HTTP Status | Trigger Condition | Remediation |
|---|---|---|---|
rest_forbidden | 403 | User is not logged in, lacks edit_posts / manage_options capability, or submitted an expired nonce. | Verify user permissions and ensure the X-WP-Nonce header is sent with wp_create_nonce('wp_rest'). |
rest_no_route | 404 | Requested URL does not match any registered endpoint under jalpi-page-builder/v1. | Check URL spelling, path parameters, and ensure plugin is active. |
post_not_found | 404 | The specified post_id does not exist, belongs to an unsupported post type, or is trashed. | Confirm post ID exists and post type is enabled in Jalpi Settings. |
invalid_param | 400 | Required body or query parameter is missing, or payload failed schema validation. | Review the endpoint parameter specifications and ensure valid JSON data types. |
db_error | 500 | Database write failed during wp_update_post, class insertion, or transient caching. | Check database server health, storage space, and WordPress table permissions. |
class_not_found | 404 | Requested Global Class ID (e.g. cls_xyz) was not found in {prefix}jalpi_classes. | Verify class key exists using GET /classes. |
duplicate_class | 409 | A class with the requested internal key or unique slug already exists. | Generate a unique class key or use PUT /classes/{id} to update existing. |
woocommerce_missing | 400 | Importing a starter site with WooCommerce catalogue dependencies while WooCommerce is inactive. | Install and activate WooCommerce before importing the selected website kit. |
AJAX Actions Error Codes#
| Action | Error Response | Cause |
|---|---|---|
jalpi_pg_page | { success: false, data: "invalid_nonce" } | Missing or invalid jalpi_pg nonce during Products Grid pagination. |
jalpi_template_preview | { success: false, data: "preview_not_found" } | Template ID does not exist or user lacks edit_posts. |
jalpi_site_preview | { success: false, data: "unauthorized" } | User lacks manage_options capability required for kit previewing. |
jalpi_support_submit | { success: false, data: "rate_limit_exceeded" } | User exceeded the rate limit (3 submissions per 3600 seconds). |
HTTP Status Codes Matrix#
| Status | Classification | Meaning in Jalpi Architecture |
|---|---|---|
200 OK | Success | Request succeeded; JSON payload returned. |
201 Created | Success | Resource created (e.g., new Global Class or Page Rebuild). |
400 Bad Request | Client Error | Invalid parameters, malformed JSON, or unparseable node tree. |
401 Unauthorized | Client Error | Authentication required (missing session cookies). |
403 Forbidden | Client Error | Failed nonce verification or missing user capabilities. |
404 Not Found | Client Error | Resource (page, revision, class, template) does not exist. |
409 Conflict | Client Error | Resource naming collision or concurrent edit conflict. |
429 Too Many Requests | Client Error | Rate limiting triggered on support diagnostics. |
500 Server Error | Server Error | Database query failure or uncaught PHP exception. |
Client-Side Error Handling#
When making REST API calls from JavaScript in the editor or admin dashboard, always extract the structured error message:
async function savePageData(postId, data) {
try {
const response = await fetch(`/wp-json/jalpi-page-builder/v1/pages/${postId}/save`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-WP-Nonce': window.jalpiEditorConfig.nonce
},
body: JSON.stringify({ pageData: data })
});
if (!response.ok) {
const err = await response.json();
console.error(`Jalpi API Error [${err.code}]: ${err.message}`);
alert(err.message || 'An unexpected error occurred.');
return false;
}
const result = await response.json();
return result;
} catch (networkError) {
console.error('Network connection error:', networkError);
return false;
}
}Related Documentation#
Related API Documentation
- REST API Overview β Authentication and route architecture.
- AJAX Actions Reference β Detailed admin-ajax.php action documentation.
- Security & Sanitization β Safe deserialization and validation pipeline.
Last updated: November 2026