mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
Log Herald rules with invalid actions via phlog()
Summary: When Herald rules fail unexpectedly due to relying on a (now) invalid action, allow Phorge administrators to get aware by creating an entry in the error log via `phlog()` instead of crossing fingers that someone may from time to time get the idea to open and read Herald transcripts. Refs T15887 Test Plan: See steps in T15887; check error log. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15887 Differential Revision: https://we.phorge.it/D25737
This commit is contained in:
parent
71615f4b99
commit
0bfe9ca88f
1 changed files with 8 additions and 0 deletions
|
@ -688,6 +688,14 @@ final class HeraldEngine extends Phobject {
|
|||
->setTarget($action->getTarget())
|
||||
->setRule($rule);
|
||||
|
||||
if ($object->getActionImplementation($action->getAction()) === null) {
|
||||
phlog(pht('An exception occurred executing Herald rule %s: Unknown '.
|
||||
'action: "%s". Review the Herald transcripts and correct or '.
|
||||
'disable the problematic rule.',
|
||||
$rule->getMonogram(),
|
||||
$action->getAction()));
|
||||
}
|
||||
|
||||
$name = $rule->getName();
|
||||
$id = $rule->getID();
|
||||
$effect->setReason(
|
||||
|
|
Loading…
Reference in a new issue