@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Log Herald rules with invalid keys via phlog()

Summary:
When Herald rules fail unexpectedly due to relying on a (now) invalid key, 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 T15885

Test Plan: See steps in T15885; check error log.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15885

Differential Revision: https://we.phorge.it/D25735

+5 -1
+5 -1
src/applications/herald/engine/HeraldEngine.php
··· 532 532 if ($caught) { 533 533 $result_data = array( 534 534 'exception.class' => get_class($caught), 535 - 'exception.message' => $ex->getMessage(), 535 + 'exception.message' => $caught->getMessage(), 536 536 ); 537 + phlog(pht('An exception occurred executing Herald rule %s: "%s" Review '. 538 + 'the Herald transcripts and correct or disable the problematic rule.', 539 + $rule->getMonogram(), 540 + $caught->getMessage())); 537 541 } 538 542 539 543 $result = HeraldConditionResult::newFromResultCode($result_code)