returnnew\WP_Error('premature',sprintf(__('Job with identifier `%1$s` is not scheduled to run yet.','automattic-cron-control'),"$timestamp-$action-$instance"));
returnnew\WP_Error('premature',sprintf(__('Job with identifier `%1$s` is not scheduled to run yet.','automattic-cron-control'),"$timestamp-$action-$instance"),array('status'=>403,));
}
// Find the event to retrieve the full arguments
...
...
@@ -122,7 +122,7 @@ class Events extends Singleton {
// Nothing to do...
if(!is_array($event)){
returnnew\WP_Error('no-event',sprintf(__('Job with identifier `%1$s` could not be found.','automattic-cron-control'),"$timestamp-$action-$instance"));
returnnew\WP_Error('no-event',sprintf(__('Job with identifier `%1$s` could not be found.','automattic-cron-control'),"$timestamp-$action-$instance"),array('status'=>404,));
}
unset($timestamp,$action,$instance);
...
...
@@ -132,7 +132,7 @@ class Events extends Singleton {
// Limit how many events are processed concurrently
returnnew\WP_Error('no-free-threads',sprintf(__('No resources available to run the job with action action `%1$s` and arguments `%2$s`.','automattic-cron-control'),$event['action'],maybe_serialize($event['args'])));
returnnew\WP_Error('no-free-threads',sprintf(__('No resources available to run the job with action action `%1$s` and arguments `%2$s`.','automattic-cron-control'),$event['action'],maybe_serialize($event['args'])),array('status'=>429,));
wp_send_json_error(new\WP_Error('forbidden',sprintf(__('Normal cron execution is blocked when the %s plugin is active.','automattic-cron-control'),'Cron Control')));
wp_send_json_error(new\WP_Error('forbidden',sprintf(__('Normal cron execution is blocked when the %s plugin is active.','automattic-cron-control'),'Cron Control')),array('status'=>400,));