A command can be completed even if there was error in the following cases:
- When using an NXQL with a syntax error, an error is logged and we materialized an empty document set so the command is completed immediately.
- When providing invalid action parameters, for each bucket an error is logged and the bucket is skipped, the command is completed.
- When the action encounter an error after retries and if continueOnFailure is true, the command is completed with some bucket in error.
For all the above case the command status's state is COMPLETED because we don't want to hang forever in the above cases.
But the status doesn't contain any information about the fact that we encounter errors.
An error flag and message should be added to the status.