Skip to main content
Version: 1.x

API04005: JSON Recovery Attempted

What This Means

The server sent a response with some invalid JSON content, but the POS attempted to recover and extract valid data. This is an informational notice rather than a critical error.

What Happened

The POS detected:

  1. The response contained extra content before or after the JSON
  2. The core JSON data was still identifiable
  3. Recovery was attempted by extracting the valid JSON portion

Common Causes

  • PHP notices in output — PHP warnings mixed with JSON
  • Debug output — Development debugging left enabled
  • Plugin notices — Other plugins outputting notices
  • Whitespace issues — Extra whitespace around JSON

How to Fix

1. Disable PHP Display Errors

In wp-config.php:

define('WP_DEBUG_DISPLAY', false);
ini_set('display_errors', 0);

2. Enable Error Logging Instead

Keep errors logged for debugging:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

3. Check for Plugin Debug Mode

Some plugins have debug modes that output extra content:

  • Review plugin settings
  • Disable debug/development modes
  • Check for verbose logging options

4. Review Recent Changes

If this started recently:

  • What changed on your server?
  • Were plugins updated?
  • Were PHP settings modified?

Is This Serious?

While the POS recovered from this issue, it indicates a configuration problem that should be fixed. The recovery process:

  • May not always work
  • Adds processing overhead
  • Could mask other issues

Fix the underlying cause to ensure reliable operation.