Add validation rule identifiers to exceptions and responses

[MAILPOET-4659]
This commit is contained in:
Jan Jakes
2022-10-06 13:44:29 +02:00
committed by Jan Jakeš
parent 9da204489d
commit 6638707282
9 changed files with 28 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ class WorkflowWalker {
$steps = $workflow->getSteps();
$root = $steps['root'] ?? null;
if (!$root) {
throw Exceptions::workflowStructureNotValid(__("Workflow must contain a 'root' step", 'mailpoet'));
throw Exceptions::workflowStructureNotValid(__("Workflow must contain a 'root' step", 'mailpoet'), 'no-root');
}
foreach ($visitors as $visitor) {
@@ -75,7 +75,8 @@ class WorkflowWalker {
__("Step with ID '%1\$s' not found (referenced from '%2\$s')", 'mailpoet'),
$stepId,
$parentStepId
)
),
'step-not-found'
);
}
}