Page MenuHomePhorge

transaction.search with XACT causes internal error
Open, LowPublic

Description

Steps to reproduce:

  1. https://phabricator.wikimedia.org/conduit/method/transaction.search/
  2. Enter "XACT" as the object type
  3. Make the request
  4. error :(

Error response:

{
  "result": null,
  "error_code": "ERR-CONDUIT-CORE",
  "error_info": "get_class() expects parameter 1 to be object, null given"
}

Stack trace:

get_class() expects parameter 1 to be object, null given
Stack trace:
PhutilErrorHandler::handleError called at [/var/www/phorge/src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php:410]
TransactionSearchConduitAPIMethod::loadTemplateObject called at [/var/www/phorge/src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php:106]
TransactionSearchConduitAPIMethod::execute called at [/var/www/phorge/src/applications/conduit/method/ConduitAPIMethod.php:156]
ConduitAPIMethod::executeMethod called at [/var/www/phorge/src/applications/conduit/call/ConduitCall.php:131]
ConduitCall::executeMethod called at [/var/www/phorge/src/applications/conduit/call/ConduitCall.php:81]
ConduitCall::execute called at [/var/www/phorge/src/applications/conduit/controller/PhabricatorConduitAPIController.php:83]
phlog called at [/var/www/phorge/src/applications/conduit/controller/PhabricatorConduitAPIController.php:111]
PhabricatorConduitAPIController::handleRequest called at [/var/www/phorge/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
AphrontApplicationConfiguration::processRequest called at [/var/www/phorge/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
AphrontApplicationConfiguration::runHTTPRequest called at [/var/www/phorge/webroot/index.php:35]

Event Timeline

valerio.bozzolan updated the task description. (Show Details)
valerio.bozzolan subscribed.
valerio.bozzolan lowered the priority of this task from Normal to Low.

Thaanks. Can reproduce in latest master. Premising that uhmmmm probably it seems we are not using the API correctly as the correct usage seems with objectType=TASK. Example to get my transactions:

objectType=TASK
constraints={"authorPHIDs": ["PHID-USER-hphk5jxfxfgl64tpfacw"]}
curl https://phabricator.wikimedia.org/api/transaction.search \
    -d api.token=api-token \
    -d objectType=TASK \
    -d constraints[authorPHIDs][0]=PHID-USER-hphk5jxfxfgl64tpfacw

So probably it works for your use-case to fetch comments for tasks of an user, so, lowering priority. Unfortunately, it seems it's not possible to only get comments, so you may need to download more stuff than needed. This may deserve another related Task, like:

Feature Requests: Transaction.search: allow to find only comments

Feel free to create that as well, to gain eternal glory, if you need this 👍 Premising that if you need to create a nice "User Stats Dashboard" maybe you can find extra info useful. So maybe you don't need this extra filter 👍