From d34dfa37461b3c7ef598df4309a83ac3fd8970fc Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 17 Oct 2019 09:14:21 -0700 Subject: [PATCH] Fix an error message when calling "transaction.search" with a non-transactional object PHID as an "objectIdentifier" Summary: See PHI1499. This error message doesn't provide parameters, and can be a little bit more helpful. Test Plan: {F6957550} Differential Revision: https://secure.phabricator.com/D20859 --- .../conduit/TransactionSearchConduitAPIMethod.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php b/src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php index 6f7f713dab..bc0311eae4 100644 --- a/src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php +++ b/src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php @@ -103,8 +103,11 @@ EOREMARKUP if (!($object instanceof PhabricatorApplicationTransactionInterface)) { throw new Exception( pht( - 'Object "%s" does not implement "%s", so transactions can not '. - 'be loaded for it.')); + 'Object "%s" (of type "%s") does not implement "%s", so '. + 'transactions can not be loaded for it.', + $object_name, + get_class($object), + 'PhabricatorApplicationTransactionInterface')); } $xaction_query = PhabricatorApplicationTransactionQuery::newQueryForObject(