If you specify an invalid commit/refname to diffusion.historyquery, the call fatals.
At time of writing, this can be reproduced here:
https://secure.phabricator.com/source/libphutil/history/master/;does-not-exist
The API call should have better behavior, and the UI on top of it should have friendlier messaging.