ElasticPress icon indicating copy to clipboard operation
ElasticPress copied to clipboard

Create a new --stop-on-errors parameter for the WP-CLI index command

Open felipeelia opened this issue 5 years ago • 0 comments

Is your enhancement related to a problem? Please describe.

Currently, WP-CLI index command will only stop if the response to the request is an error. Otherwise, it will record all errors (like "too many fields" errors) and present them at the end of the whole process.

Describe the solution you'd like

It would be nice to have a way to stop everything on the first sign of a problem.

Additional context Related lines of code: Line where the command will stop if the response is an error: https://github.com/10up/ElasticPress/blob/develop/includes/classes/Command.php#L889 Line where the command will add the "soft errors" to an array: https://github.com/10up/ElasticPress/blob/develop/includes/classes/Command.php#L917 Line where all errors are finally displayed: https://github.com/10up/ElasticPress/blob/develop/includes/classes/Command.php#L946

felipeelia avatar Dec 14 '20 19:12 felipeelia