Skip to content

Commit 3531d8d

Browse files
committed
Use the dedicated payload integrity failure for invalid Nexus results
1 parent 165f5a4 commit 3531d8d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/V2/Support/ServiceCallWorkflowDelivery.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Workflow\V2\Enums\HistoryEventType;
99
use Workflow\V2\Enums\TaskStatus;
1010
use Workflow\V2\Enums\TaskType;
11+
use Workflow\V2\Exceptions\ExternalPayloadIntegrityException;
1112
use Workflow\V2\Models\WorkflowHistoryEvent;
1213
use Workflow\V2\Models\WorkflowRun;
1314
use Workflow\V2\Models\WorkflowServiceCall;
@@ -269,7 +270,7 @@ private static function resultForCaller(WorkflowServiceCall $call): ?array
269270
// service namespace's provider or authenticated transport reference.
270271
$blob = ExternalPayloads::payloadBlob($result, $call->payload_codec, $call->target_namespace);
271272
if ($blob === null) {
272-
throw new RuntimeException('The external Nexus result has no encoded payload.');
273+
throw new ExternalPayloadIntegrityException('The external Nexus result has no encoded payload.');
273274
}
274275
$stored = ExternalPayloads::externalizeForNamespace($blob, $call->payload_codec, $call->caller_namespace);
275276

0 commit comments

Comments
 (0)