Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 8becb93

Browse files
author
Vasiliev.A
committed
save operation error message and code when rejected
1 parent 3fe794a commit 8becb93

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

app/code/Magento/WebapiAsync/Model/MessageQueue/MassSchedule.php

+13-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,19 @@ public function publishMass($topicName, $entitiesArray, $groupId = null)
188188
//TODO after merge with BulkApi Status need change cons from OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED to OperationInterface::STATUS_TYPE_REJECTED
189189
$operationStatus = OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED;
190190
}
191-
192-
$operation = $this->saveOperation($groupId, $topicName, $data, $operationStatus);
191+
if (!isset($exception)) {
192+
$operation = $this->saveOperation($groupId, $topicName, $data, $operationStatus);
193+
} else {
194+
$operation =
195+
$this->saveOperation(
196+
$groupId,
197+
$topicName,
198+
$data,
199+
$operationStatus,
200+
$exception->getMessage(),
201+
$exception->getCode()
202+
);
203+
}
193204
if (!isset($exception)) {
194205
$operations[] = $operation;
195206
}

0 commit comments

Comments
 (0)