public static StatusResult Failed(IEnumerable <CommandError> errors, string commandId = null, string state = null, string stateMessage = null) => new StatusResult { CommandId = commandId, Code = StatusCodes.Status200OK, Status = "Failed", State = string.IsNullOrWhiteSpace(state) ? null : state, StateMessage = string.IsNullOrWhiteSpace(stateMessage) ? null : stateMessage, Errors = errors?.Select(error => ResultError.Failed(error)).ToList() ?? new List <ResultError>() };